embedoc 0.13.2 → 0.14.0
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.
- package/dist/embedoc.bundle.mjs +1089 -0
- package/dist/embedoc.bundle.mjs.map +7 -0
- package/dist/generated/contract.d.ts +3 -0
- package/dist/generated/contract.d.ts.map +1 -0
- package/dist/generated/contract.js +5 -0
- package/dist/generated/contract.js.map +1 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/program.d.ts.map +1 -1
- package/dist/generated/program.js +86 -0
- package/dist/generated/program.js.map +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1,1089 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
var A_=Object.create;var kl=Object.defineProperty;var y_=Object.getOwnPropertyDescriptor;var w_=Object.getOwnPropertyNames;var b_=Object.getPrototypeOf,__=Object.prototype.hasOwnProperty;var le=(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 Pe=(t,e)=>()=>(t&&(e=t(t=0)),e);var R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wh=(t,e)=>{for(var r in e)kl(t,r,{get:e[r],enumerable:!0})},v_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w_(e))!__.call(t,i)&&i!==r&&kl(t,i,{get:()=>e[i],enumerable:!(n=y_(e,i))||n.enumerable});return t};var vn=(t,e,r)=>(r=t!=null?A_(b_(t)):{},v_(e||!t||!t.__esModule?kl(r,"default",{value:t,enumerable:!0}):r,t));var zd=R((w4,ql)=>{var Vs=process||{},Vd=Vs.argv||[],Js=Vs.env||{},q2=!(Js.NO_COLOR||Vd.includes("--no-color"))&&(!!Js.FORCE_COLOR||Vd.includes("--color")||Vs.platform==="win32"||(Vs.stdout||{}).isTTY&&Js.TERM!=="dumb"||!!Js.CI),H2=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+$2(i,e,r,s)+e:t+i+e},$2=(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)},Yd=(t=q2)=>{let e=t?H2:()=>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")}};ql.exports=Yd();ql.exports.createColors=Yd});var sc=R((q4,zp)=>{"use strict";var ic=Object.defineProperty,JE=Object.getOwnPropertyDescriptor,VE=Object.getOwnPropertyNames,YE=Object.prototype.hasOwnProperty,zE=(t,e)=>{for(var r in e)ic(t,r,{get:e[r],enumerable:!0})},XE=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of VE(e))!YE.call(t,i)&&i!==r&&ic(t,i,{get:()=>e[i],enumerable:!(n=JE(e,i))||n.enumerable});return t},ZE=t=>XE(ic({},"__esModule",{value:!0}),t),Bi={};zE(Bi,{analyzeMetafile:()=>BC,analyzeMetafileSync:()=>RC,build:()=>SC,buildSync:()=>LC,context:()=>kC,default:()=>QC,formatMessages:()=>OC,formatMessagesSync:()=>PC,initialize:()=>TC,stop:()=>NC,transform:()=>IC,transformSync:()=>DC,version:()=>xC});zp.exports=ZE(Bi);function kp(t){let e=n=>{if(n===null)r.write8(0);else if(typeof n=="boolean")r.write8(1),r.write8(+n);else if(typeof n=="number")r.write8(2),r.write32(n|0);else if(typeof n=="string")r.write8(3),r.write(Tt(n));else if(n instanceof Uint8Array)r.write8(4),r.write(n);else if(n instanceof Array){r.write8(5),r.write32(n.length);for(let i of n)e(i)}else{let i=Object.keys(n);r.write8(6),r.write32(i.length);for(let s of i)r.write(Tt(s)),e(n[s])}},r=new Fp;return r.write32(0),r.write32(t.id<<1|+!t.isRequest),e(t.value),tc(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function eC(t){let e=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return Wr(r.read());case 4:return r.read();case 5:{let o=r.read32(),a=[];for(let l=0;l<o;l++)a.push(e());return a}case 6:{let o=r.read32(),a={};for(let l=0;l<o;l++)a[Wr(r.read())]=e();return a}default:throw new Error("Invalid packet")}},r=new Fp(t),n=r.read32(),i=(n&1)===0;n>>>=1;let s=e();if(r.ptr!==t.length)throw new Error("Invalid packet");return{id:n,isRequest:i,value:s}}var Fp=class{constructor(t=new Uint8Array(1024)){this.buf=t,this.len=0,this.ptr=0}_write(t){if(this.len+t>this.buf.length){let e=new Uint8Array((this.len+t)*2);e.set(this.buf),this.buf=e}return this.len+=t,this.len-t}write8(t){let e=this._write(1);this.buf[e]=t}write32(t){let e=this._write(4);tc(this.buf,t,e)}write(t){let e=this._write(4+t.length);tc(this.buf,t.length,e),this.buf.set(t,e+4)}_read(t){if(this.ptr+t>this.buf.length)throw new Error("Invalid packet");return this.ptr+=t,this.ptr-t}read8(){return this.buf[this._read(1)]}read32(){return Qp(this.buf,this._read(4))}read(){let t=this.read32(),e=new Uint8Array(t),r=this._read(e.length);return e.set(this.buf.subarray(r,r+t)),e}},Tt,Wr,ec;if(typeof TextEncoder<"u"&&typeof TextDecoder<"u"){let t=new TextEncoder,e=new TextDecoder;Tt=r=>t.encode(r),Wr=r=>e.decode(r),ec='new TextEncoder().encode("")'}else if(typeof Buffer<"u")Tt=t=>Buffer.from(t),Wr=t=>{let{buffer:e,byteOffset:r,byteLength:n}=t;return Buffer.from(e,r,n).toString()},ec='Buffer.from("")';else throw new Error("No UTF-8 codec found");if(!(Tt("")instanceof Uint8Array))throw new Error(`Invariant violation: "${ec} instanceof Uint8Array" is incorrectly false
|
|
5
|
+
|
|
6
|
+
This indicates that your JavaScript environment is broken. You cannot use
|
|
7
|
+
esbuild in this environment because esbuild relies on this invariant. This
|
|
8
|
+
is not a problem with esbuild. You need to fix your environment instead.
|
|
9
|
+
`);function Qp(t,e){return(t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24)>>>0}function tc(t,e,r){t[r++]=e,t[r++]=e>>8,t[r++]=e>>16,t[r++]=e>>24}var Zt=String.fromCharCode;function Ct(t,e,r){let n=t[e],i=1,s=0;for(let o=0;o<e;o++)t[o]===10?(i++,s=0):s++;throw new SyntaxError(r||(e===t.length?"Unexpected end of input while parsing JSON":n>=32&&n<=126?`Unexpected character ${Zt(n)} in JSON at position ${e} (line ${i}, column ${s})`:`Unexpected byte 0x${n.toString(16)} in JSON at position ${e} (line ${i}, column ${s})`))}function tC(t){if(!(t instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");let e=[],r=[],n=[],i=t.length,s=null,o=0,a,l=0;for(;l<i;){let u=t[l++];if(u<=32)continue;let f;switch(o===2&&s===null&&u!==34&&u!==125&&Ct(t,--l),u){case 116:{(t[l++]!==114||t[l++]!==117||t[l++]!==101)&&Ct(t,--l),f=!0;break}case 102:{(t[l++]!==97||t[l++]!==108||t[l++]!==115||t[l++]!==101)&&Ct(t,--l),f=!1;break}case 110:{(t[l++]!==117||t[l++]!==108||t[l++]!==108)&&Ct(t,--l),f=null;break}case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{let c=l;for(f=Zt(u),u=t[l];;){switch(u){case 43:case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 101:case 69:{f+=Zt(u),u=t[++l];continue}}break}f=+f,isNaN(f)&&Ct(t,--c,"Invalid number");break}case 34:{for(f="";l>=i&&Ct(t,i),u=t[l++],u!==34;)if(u===92)switch(t[l++]){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=`
|
|
10
|
+
`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:{let c=0;for(let d=0;d<4;d++)u=t[l++],c<<=4,u>=48&&u<=57?c|=u-48:u>=97&&u<=102?c|=u+-87:u>=65&&u<=70?c|=u+-55:Ct(t,--l);f+=Zt(c);break}default:Ct(t,--l);break}else if(u<=127)f+=Zt(u);else if((u&224)===192)f+=Zt((u&31)<<6|t[l++]&63);else if((u&240)===224)f+=Zt((u&15)<<12|(t[l++]&63)<<6|t[l++]&63);else if((u&248)==240){let c=(u&7)<<18|(t[l++]&63)<<12|(t[l++]&63)<<6|t[l++]&63;c>65535&&(c-=65536,f+=Zt(c>>10&1023|55296),c=56320|c&1023),f+=Zt(c)}f[0];break}case 91:{f=[],e.push(s),r.push(a),n.push(o),s=null,a=f,o=1;continue}case 123:{f={},e.push(s),r.push(a),n.push(o),s=null,a=f,o=2;continue}case 93:{o!==1&&Ct(t,--l),f=a,s=e.pop(),a=r.pop(),o=n.pop();break}case 125:{o!==2&&Ct(t,--l),f=a,s=e.pop(),a=r.pop(),o=n.pop();break}default:Ct(t,--l)}for(u=t[l];u<=32;)u=t[++l];switch(o){case 0:{if(l===i)return f;break}case 1:{if(a.push(f),u===44){l++;continue}if(u===93)continue;break}case 2:{if(s===null){if(s=f,u===58){l++;continue}}else{if(a[s]=f,s=null,u===44){l++;continue}if(u===125)continue}break}}break}Ct(t,l)}var Oe=JSON.stringify,Ip="warning",Op="silent";function Bn(t,e){let r=[];for(let n of t){if(at(n,e),n.indexOf(",")>=0)throw new Error(`Invalid ${e}: ${n}`);r.push(n)}return r.join(",")}var ao=()=>null,ye=t=>typeof t=="boolean"?null:"a boolean",J=t=>typeof t=="string"?null:"a string",lo=t=>t instanceof RegExp?null:"a RegExp object",qr=t=>typeof t=="number"&&t===(t|0)?null:"an integer",rC=t=>typeof t=="number"&&t===(t|0)&&t>=0&&t<=65535?null:"a valid port number",Mp=t=>typeof t=="function"?null:"a function",er=t=>Array.isArray(t)?null:"an array",lt=t=>Array.isArray(t)&&t.every(e=>typeof e=="string")?null:"an array of strings",pt=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",nC=t=>typeof t=="object"&&t!==null?null:"an array or an object",iC=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",Bp=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",jp=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",sC=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",Up=t=>typeof t=="string"||Array.isArray(t)&&t.every(e=>typeof e=="string")?null:"a string or an array of strings",qp=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array",oC=t=>typeof t=="string"||t instanceof URL?null:"a string or a URL";function I(t,e,r,n){let i=t[r];if(e[r+""]=!0,i===void 0)return;let s=n(i);if(s!==null)throw new Error(`${Oe(r)} must be ${s}`);return i}function xe(t,e,r){for(let n in t)if(!(n in e))throw new Error(`Invalid option ${r}: ${Oe(n)}`)}function aC(t){let e=Object.create(null),r=I(t,e,"wasmURL",oC),n=I(t,e,"wasmModule",iC),i=I(t,e,"worker",ye);return xe(t,e,"in initialize() call"),{wasmURL:r,wasmModule:n,worker:i}}function Hp(t){let e;if(t!==void 0){e=Object.create(null);for(let r in t){let n=t[r];if(typeof n=="string"||n===!1)e[r]=n;else throw new Error(`Expected ${Oe(r)} in mangle cache to map to either a string or false`)}}return e}function po(t,e,r,n,i){let s=I(e,r,"color",ye),o=I(e,r,"logLevel",J),a=I(e,r,"logLimit",qr);s!==void 0?t.push(`--color=${s}`):n&&t.push("--color=true"),t.push(`--log-level=${o||i}`),t.push(`--log-limit=${a||0}`)}function at(t,e,r){if(typeof t!="string")throw new Error(`Expected value for ${e}${r!==void 0?" "+Oe(r):""} to be a string, got ${typeof t} instead`);return t}function $p(t,e,r){let n=I(e,r,"legalComments",J),i=I(e,r,"sourceRoot",J),s=I(e,r,"sourcesContent",ye),o=I(e,r,"target",Up),a=I(e,r,"format",J),l=I(e,r,"globalName",J),u=I(e,r,"mangleProps",lo),f=I(e,r,"reserveProps",lo),c=I(e,r,"mangleQuoted",ye),d=I(e,r,"minify",ye),p=I(e,r,"minifySyntax",ye),m=I(e,r,"minifyWhitespace",ye),g=I(e,r,"minifyIdentifiers",ye),A=I(e,r,"lineLimit",qr),y=I(e,r,"drop",lt),_=I(e,r,"dropLabels",lt),b=I(e,r,"charset",J),E=I(e,r,"treeShaking",ye),v=I(e,r,"ignoreAnnotations",ye),C=I(e,r,"jsx",J),O=I(e,r,"jsxFactory",J),M=I(e,r,"jsxFragment",J),q=I(e,r,"jsxImportSource",J),F=I(e,r,"jsxDev",ye),B=I(e,r,"jsxSideEffects",ye),P=I(e,r,"define",pt),L=I(e,r,"logOverride",pt),D=I(e,r,"supported",pt),j=I(e,r,"pure",lt),K=I(e,r,"keepNames",ye),H=I(e,r,"platform",J),Y=I(e,r,"tsconfigRaw",sC),V=I(e,r,"absPaths",lt);if(n&&t.push(`--legal-comments=${n}`),i!==void 0&&t.push(`--source-root=${i}`),s!==void 0&&t.push(`--sources-content=${s}`),o&&t.push(`--target=${Bn(Array.isArray(o)?o:[o],"target")}`),a&&t.push(`--format=${a}`),l&&t.push(`--global-name=${l}`),H&&t.push(`--platform=${H}`),Y&&t.push(`--tsconfig-raw=${typeof Y=="string"?Y:JSON.stringify(Y)}`),d&&t.push("--minify"),p&&t.push("--minify-syntax"),m&&t.push("--minify-whitespace"),g&&t.push("--minify-identifiers"),A&&t.push(`--line-limit=${A}`),b&&t.push(`--charset=${b}`),E!==void 0&&t.push(`--tree-shaking=${E}`),v&&t.push("--ignore-annotations"),y)for(let Q of y)t.push(`--drop:${at(Q,"drop")}`);if(_&&t.push(`--drop-labels=${Bn(_,"drop label")}`),V&&t.push(`--abs-paths=${Bn(V,"abs paths")}`),u&&t.push(`--mangle-props=${co(u)}`),f&&t.push(`--reserve-props=${co(f)}`),c!==void 0&&t.push(`--mangle-quoted=${c}`),C&&t.push(`--jsx=${C}`),O&&t.push(`--jsx-factory=${O}`),M&&t.push(`--jsx-fragment=${M}`),q&&t.push(`--jsx-import-source=${q}`),F&&t.push("--jsx-dev"),B&&t.push("--jsx-side-effects"),P)for(let Q in P){if(Q.indexOf("=")>=0)throw new Error(`Invalid define: ${Q}`);t.push(`--define:${Q}=${at(P[Q],"define",Q)}`)}if(L)for(let Q in L){if(Q.indexOf("=")>=0)throw new Error(`Invalid log override: ${Q}`);t.push(`--log-override:${Q}=${at(L[Q],"log override",Q)}`)}if(D)for(let Q in D){if(Q.indexOf("=")>=0)throw new Error(`Invalid supported: ${Q}`);let re=D[Q];if(typeof re!="boolean")throw new Error(`Expected value for supported ${Oe(Q)} to be a boolean, got ${typeof re} instead`);t.push(`--supported:${Q}=${re}`)}if(j)for(let Q of j)t.push(`--pure:${at(Q,"pure")}`);K&&t.push("--keep-names")}function lC(t,e,r,n,i){var s;let o=[],a=[],l=Object.create(null),u=null,f=null;po(o,e,l,r,n),$p(o,e,l);let c=I(e,l,"sourcemap",jp),d=I(e,l,"bundle",ye),p=I(e,l,"splitting",ye),m=I(e,l,"preserveSymlinks",ye),g=I(e,l,"metafile",ye),A=I(e,l,"outfile",J),y=I(e,l,"outdir",J),_=I(e,l,"outbase",J),b=I(e,l,"tsconfig",J),E=I(e,l,"resolveExtensions",lt),v=I(e,l,"nodePaths",lt),C=I(e,l,"mainFields",lt),O=I(e,l,"conditions",lt),M=I(e,l,"external",lt),q=I(e,l,"packages",J),F=I(e,l,"alias",pt),B=I(e,l,"loader",pt),P=I(e,l,"outExtension",pt),L=I(e,l,"publicPath",J),D=I(e,l,"entryNames",J),j=I(e,l,"chunkNames",J),K=I(e,l,"assetNames",J),H=I(e,l,"inject",lt),Y=I(e,l,"banner",pt),V=I(e,l,"footer",pt),Q=I(e,l,"entryPoints",nC),re=I(e,l,"absWorkingDir",J),ne=I(e,l,"stdin",pt),ie=(s=I(e,l,"write",ye))!=null?s:i,pe=I(e,l,"allowOverwrite",ye),ge=I(e,l,"mangleCache",pt);if(l.plugins=!0,xe(e,l,`in ${t}() call`),c&&o.push(`--sourcemap${c===!0?"":`=${c}`}`),d&&o.push("--bundle"),pe&&o.push("--allow-overwrite"),p&&o.push("--splitting"),m&&o.push("--preserve-symlinks"),g&&o.push("--metafile"),A&&o.push(`--outfile=${A}`),y&&o.push(`--outdir=${y}`),_&&o.push(`--outbase=${_}`),b&&o.push(`--tsconfig=${b}`),q&&o.push(`--packages=${q}`),E&&o.push(`--resolve-extensions=${Bn(E,"resolve extension")}`),L&&o.push(`--public-path=${L}`),D&&o.push(`--entry-names=${D}`),j&&o.push(`--chunk-names=${j}`),K&&o.push(`--asset-names=${K}`),C&&o.push(`--main-fields=${Bn(C,"main field")}`),O&&o.push(`--conditions=${Bn(O,"condition")}`),M)for(let $ of M)o.push(`--external:${at($,"external")}`);if(F)for(let $ in F){if($.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${$}`);o.push(`--alias:${$}=${at(F[$],"alias",$)}`)}if(Y)for(let $ in Y){if($.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${$}`);o.push(`--banner:${$}=${at(Y[$],"banner",$)}`)}if(V)for(let $ in V){if($.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${$}`);o.push(`--footer:${$}=${at(V[$],"footer",$)}`)}if(H)for(let $ of H)o.push(`--inject:${at($,"inject")}`);if(B)for(let $ in B){if($.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${$}`);o.push(`--loader:${$}=${at(B[$],"loader",$)}`)}if(P)for(let $ in P){if($.indexOf("=")>=0)throw new Error(`Invalid out extension: ${$}`);o.push(`--out-extension:${$}=${at(P[$],"out extension",$)}`)}if(Q)if(Array.isArray(Q))for(let $=0,it=Q.length;$<it;$++){let De=Q[$];if(typeof De=="object"&&De!==null){let ht=Object.create(null),vt=I(De,ht,"in",J),Je=I(De,ht,"out",J);if(xe(De,ht,"in entry point at index "+$),vt===void 0)throw new Error('Missing property "in" for entry point at index '+$);if(Je===void 0)throw new Error('Missing property "out" for entry point at index '+$);a.push([Je,vt])}else a.push(["",at(De,"entry point at index "+$)])}else for(let $ in Q)a.push([$,at(Q[$],"entry point",$)]);if(ne){let $=Object.create(null),it=I(ne,$,"contents",qp),De=I(ne,$,"resolveDir",J),ht=I(ne,$,"sourcefile",J),vt=I(ne,$,"loader",J);xe(ne,$,'in "stdin" object'),ht&&o.push(`--sourcefile=${ht}`),vt&&o.push(`--loader=${vt}`),De&&(f=De),typeof it=="string"?u=Tt(it):it instanceof Uint8Array&&(u=it)}let _t=[];if(v)for(let $ of v)$+="",_t.push($);return{entries:a,flags:o,write:ie,stdinContents:u,stdinResolveDir:f,absWorkingDir:re,nodePaths:_t,mangleCache:Hp(ge)}}function cC(t,e,r,n){let i=[],s=Object.create(null);po(i,e,s,r,n),$p(i,e,s);let o=I(e,s,"sourcemap",jp),a=I(e,s,"sourcefile",J),l=I(e,s,"loader",J),u=I(e,s,"banner",J),f=I(e,s,"footer",J),c=I(e,s,"mangleCache",pt);return xe(e,s,`in ${t}() call`),o&&i.push(`--sourcemap=${o===!0?"external":o}`),a&&i.push(`--sourcefile=${a}`),l&&i.push(`--loader=${l}`),u&&i.push(`--banner=${u}`),f&&i.push(`--footer=${f}`),{flags:i,mangleCache:Hp(c)}}function Wp(t){let e={},r={didClose:!1,reason:""},n={},i=0,s=0,o=new Uint8Array(16*1024),a=0,l=b=>{let E=a+b.length;if(E>o.length){let C=new Uint8Array(E*2);C.set(o),o=C}o.set(b,a),a+=b.length;let v=0;for(;v+4<=a;){let C=Qp(o,v);if(v+4+C>a)break;v+=4,m(o.subarray(v,v+C)),v+=C}v>0&&(o.copyWithin(0,v,a),a-=v)},u=b=>{r.didClose=!0,b&&(r.reason=": "+(b.message||b));let E="The service was stopped"+r.reason;for(let v in n)n[v](E,null);n={}},f=(b,E,v)=>{if(r.didClose)return v("The service is no longer running"+r.reason,null);let C=i++;n[C]=(O,M)=>{try{v(O,M)}finally{b&&b.unref()}},b&&b.ref(),t.writeToStdin(kp({id:C,isRequest:!0,value:E}))},c=(b,E)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);t.writeToStdin(kp({id:b,isRequest:!1,value:E}))},d=async(b,E)=>{try{if(E.command==="ping"){c(b,{});return}if(typeof E.key=="number"){let v=e[E.key];if(!v)return;let C=v[E.command];if(C){await C(b,E);return}}throw new Error("Invalid command: "+E.command)}catch(v){let C=[Ur(v,t,null,void 0,"")];try{c(b,{errors:C})}catch{}}},p=!0,m=b=>{if(p){p=!1;let v=String.fromCharCode(...b);if(v!=="0.28.0")throw new Error(`Cannot start service: Host version "0.28.0" does not match binary version ${Oe(v)}`);return}let E=eC(b);if(E.isRequest)d(E.id,E.value);else{let v=n[E.id];delete n[E.id],E.value.error?v(E.value.error,{}):v(null,E.value)}};return{readFromStdout:l,afterClose:u,service:{buildOrContext:({callName:b,refs:E,options:v,isTTY:C,defaultWD:O,callback:M})=>{let q=0,F=s++,B={},P={ref(){++q===1&&E&&E.ref()},unref(){--q===0&&(delete e[F],E&&E.unref())}};e[F]=B,P.ref(),uC(b,F,f,c,P,t,B,v,C,O,(L,D)=>{try{M(L,D)}finally{P.unref()}})},transform:({callName:b,refs:E,input:v,options:C,isTTY:O,fs:M,callback:q})=>{let F=Kp(),B=P=>{try{if(typeof v!="string"&&!(v instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:L,mangleCache:D}=cC(b,C,O,Op),j={command:"transform",flags:L,inputFS:P!==null,input:P!==null?Tt(P):typeof v=="string"?Tt(v):v};D&&(j.mangleCache=D),f(E,j,(K,H)=>{if(K)return q(new Error(K),null);let Y=Ln(H.errors,F),V=Ln(H.warnings,F),Q=1,re=()=>{if(--Q===0){let ne={warnings:V,code:H.code,map:H.map,mangleCache:void 0,legalComments:void 0};"legalComments"in H&&(ne.legalComments=H?.legalComments),H.mangleCache&&(ne.mangleCache=H?.mangleCache),q(null,ne)}};if(Y.length>0)return q(Ii("Transform failed",Y,V),null);H.codeFS&&(Q++,M.readFile(H.code,(ne,ie)=>{ne!==null?q(ne,null):(H.code=ie,re())})),H.mapFS&&(Q++,M.readFile(H.map,(ne,ie)=>{ne!==null?q(ne,null):(H.map=ie,re())})),re()})}catch(L){let D=[];try{po(D,C,{},O,Op)}catch{}let j=Ur(L,t,F,void 0,"");f(E,{command:"error",flags:D,error:j},()=>{j.detail=F.load(j.detail),q(Ii("Transform failed",[j],[]),null)})}};if((typeof v=="string"||v instanceof Uint8Array)&&v.length>1024*1024){let P=B;B=()=>M.writeFile(v,P)}B(null)},formatMessages:({callName:b,refs:E,messages:v,options:C,callback:O})=>{if(!C)throw new Error(`Missing second argument in ${b}() call`);let M={},q=I(C,M,"kind",J),F=I(C,M,"color",ye),B=I(C,M,"terminalWidth",qr);if(xe(C,M,`in ${b}() call`),q===void 0)throw new Error(`Missing "kind" in ${b}() call`);if(q!=="error"&&q!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${b}() call`);let P={command:"format-msgs",messages:tr(v,"messages",null,"",B),isWarning:q==="warning"};F!==void 0&&(P.color=F),B!==void 0&&(P.terminalWidth=B),f(E,P,(L,D)=>{if(L)return O(new Error(L),null);O(null,D.messages)})},analyzeMetafile:({callName:b,refs:E,metafile:v,options:C,callback:O})=>{C===void 0&&(C={});let M={},q=I(C,M,"color",ye),F=I(C,M,"verbose",ye);xe(C,M,`in ${b}() call`);let B={command:"analyze-metafile",metafile:v};q!==void 0&&(B.color=q),F!==void 0&&(B.verbose=F),f(E,B,(P,L)=>{if(P)return O(new Error(P),null);O(null,L.result)})}}}}function uC(t,e,r,n,i,s,o,a,l,u,f){let c=Kp(),d=t==="context",p=(A,y)=>{let _=[];try{po(_,a,{},l,Ip)}catch{}let b=Ur(A,s,c,void 0,y);r(i,{command:"error",flags:_,error:b},()=>{b.detail=c.load(b.detail),f(Ii(d?"Context failed":"Build failed",[b],[]),null)})},m;if(typeof a=="object"){let A=a.plugins;if(A!==void 0){if(!Array.isArray(A))return p(new Error('"plugins" must be an array'),"");m=A}}if(m&&m.length>0){if(s.isSync)return p(new Error("Cannot use plugins in synchronous API calls"),"");fC(e,r,n,i,s,o,a,m,c).then(A=>{if(!A.ok)return p(A.error,A.pluginName);try{g(A.requestPlugins,A.runOnEndCallbacks,A.scheduleOnDisposeCallbacks)}catch(y){p(y,"")}},A=>p(A,""));return}try{g(null,(A,y)=>y([],[]),()=>{})}catch(A){p(A,"")}function g(A,y,_){let b=s.hasFS,{entries:E,flags:v,write:C,stdinContents:O,stdinResolveDir:M,absWorkingDir:q,nodePaths:F,mangleCache:B}=lC(t,a,l,Ip,b);if(C&&!s.hasFS)throw new Error('The "write" option is unavailable in this environment');let P={command:"build",key:e,entries:E,flags:v,write:C,stdinContents:O,stdinResolveDir:M,absWorkingDir:q||u,nodePaths:F,context:d};A&&(P.plugins=A),B&&(P.mangleCache=B);let L=(K,H)=>{let Y={errors:Ln(K.errors,c),warnings:Ln(K.warnings,c),outputFiles:void 0,metafile:void 0,mangleCache:void 0},V=Y.errors.slice(),Q=Y.warnings.slice();K.outputFiles&&(Y.outputFiles=K.outputFiles.map(dC)),K.metafile&&K.metafile.length&&(Y.metafile=pC(K.metafile)),K.mangleCache&&(Y.mangleCache=K.mangleCache),K.writeToStdout!==void 0&&console.log(Wr(K.writeToStdout).replace(/\n$/,"")),y(Y,(re,ne)=>{if(V.length>0||re.length>0){let ie=Ii("Build failed",V.concat(re),Q.concat(ne));return H(ie,null,re,ne)}H(null,Y,re,ne)})},D,j;d&&(o["on-end"]=(K,H)=>new Promise(Y=>{L(H,(V,Q,re,ne)=>{let ie={errors:re,warnings:ne};j&&j(V,Q),D=void 0,j=void 0,n(K,ie),Y()})})),r(i,P,(K,H)=>{if(K)return f(new Error(K),null);if(!d)return L(H,(Q,re)=>(_(),f(Q,re)));if(H.errors.length>0)return f(Ii("Context failed",H.errors,H.warnings),null);let Y=!1,V={rebuild:()=>(D||(D=new Promise((Q,re)=>{let ne;j=(pe,ge)=>{ne||(ne=()=>pe?re(pe):Q(ge))};let ie=()=>{r(i,{command:"rebuild",key:e},(ge,_t)=>{ge?re(new Error(ge)):ne?ne():ie()})};ie()})),D),watch:(Q={})=>new Promise((re,ne)=>{if(!s.hasFS)throw new Error('Cannot use the "watch" API in this environment');let ie={},pe=I(Q,ie,"delay",qr);xe(Q,ie,"in watch() call");let ge={command:"watch",key:e};pe&&(ge.delay=pe),r(i,ge,_t=>{_t?ne(new Error(_t)):re(void 0)})}),serve:(Q={})=>new Promise((re,ne)=>{if(!s.hasFS)throw new Error('Cannot use the "serve" API in this environment');let ie={},pe=I(Q,ie,"port",rC),ge=I(Q,ie,"host",J),_t=I(Q,ie,"servedir",J),$=I(Q,ie,"keyfile",J),it=I(Q,ie,"certfile",J),De=I(Q,ie,"fallback",J),ht=I(Q,ie,"cors",pt),vt=I(Q,ie,"onRequest",Mp);xe(Q,ie,"in serve() call");let Je={command:"serve",key:e,onRequest:!!vt};if(pe!==void 0&&(Je.port=pe),ge!==void 0&&(Je.host=ge),_t!==void 0&&(Je.servedir=_t),$!==void 0&&(Je.keyfile=$),it!==void 0&&(Je.certfile=it),De!==void 0&&(Je.fallback=De),ht){let dr={},zt=I(ht,dr,"origin",Up);xe(ht,dr,'on "cors" object'),Array.isArray(zt)?Je.corsOrigin=zt:zt!==void 0&&(Je.corsOrigin=[zt])}r(i,Je,(dr,zt)=>{if(dr)return ne(new Error(dr));vt&&(o["serve-request"]=(js,Us)=>{vt(Us.args),n(js,{})}),re(zt)})}),cancel:()=>new Promise(Q=>{if(Y)return Q();r(i,{command:"cancel",key:e},()=>{Q()})}),dispose:()=>new Promise(Q=>{if(Y)return Q();Y=!0,r(i,{command:"dispose",key:e},()=>{Q(),_(),i.unref()})})};i.ref(),f(null,V)})}}var fC=async(t,e,r,n,i,s,o,a,l)=>{let u=[],f=[],c={},d={},p=[],m=0,g=0,A=[],y=!1;a=[...a];for(let E of a){let v={};if(typeof E!="object")throw new Error(`Plugin at index ${g} must be an object`);let C=I(E,v,"name",J);if(typeof C!="string"||C==="")throw new Error(`Plugin at index ${g} is missing a name`);try{let O=I(E,v,"setup",Mp);if(typeof O!="function")throw new Error("Plugin is missing a setup function");xe(E,v,`on plugin ${Oe(C)}`);let M={name:C,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};g++;let F=O({initialOptions:o,resolve:(B,P={})=>{if(!y)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof B!="string")throw new Error("The path to resolve must be a string");let L=Object.create(null),D=I(P,L,"pluginName",J),j=I(P,L,"importer",J),K=I(P,L,"namespace",J),H=I(P,L,"resolveDir",J),Y=I(P,L,"kind",J),V=I(P,L,"pluginData",ao),Q=I(P,L,"with",pt);return xe(P,L,"in resolve() call"),new Promise((re,ne)=>{let ie={command:"resolve",path:B,key:t,pluginName:C};if(D!=null&&(ie.pluginName=D),j!=null&&(ie.importer=j),K!=null&&(ie.namespace=K),H!=null&&(ie.resolveDir=H),Y!=null)ie.kind=Y;else throw new Error('Must specify "kind" when calling "resolve"');V!=null&&(ie.pluginData=l.store(V)),Q!=null&&(ie.with=hC(Q,"with")),e(n,ie,(pe,ge)=>{pe!==null?ne(new Error(pe)):re({errors:Ln(ge.errors,l),warnings:Ln(ge.warnings,l),path:ge.path,external:ge.external,sideEffects:ge.sideEffects,namespace:ge.namespace,suffix:ge.suffix,pluginData:l.load(ge.pluginData)})})})},onStart(B){let P='This error came from the "onStart" callback registered here:',L=so(new Error(P),i,"onStart");u.push({name:C,callback:B,note:L}),M.onStart=!0},onEnd(B){let P='This error came from the "onEnd" callback registered here:',L=so(new Error(P),i,"onEnd");f.push({name:C,callback:B,note:L}),M.onEnd=!0},onResolve(B,P){let L='This error came from the "onResolve" callback registered here:',D=so(new Error(L),i,"onResolve"),j={},K=I(B,j,"filter",lo),H=I(B,j,"namespace",J);if(xe(B,j,`in onResolve() call for plugin ${Oe(C)}`),K==null)throw new Error("onResolve() call is missing a filter");let Y=m++;c[Y]={name:C,callback:P,note:D},M.onResolve.push({id:Y,filter:co(K),namespace:H||""})},onLoad(B,P){let L='This error came from the "onLoad" callback registered here:',D=so(new Error(L),i,"onLoad"),j={},K=I(B,j,"filter",lo),H=I(B,j,"namespace",J);if(xe(B,j,`in onLoad() call for plugin ${Oe(C)}`),K==null)throw new Error("onLoad() call is missing a filter");let Y=m++;d[Y]={name:C,callback:P,note:D},M.onLoad.push({id:Y,filter:co(K),namespace:H||""})},onDispose(B){p.push(B)},esbuild:i.esbuild});F&&await F,A.push(M)}catch(O){return{ok:!1,error:O,pluginName:C}}}s["on-start"]=async(E,v)=>{l.clear();let C={errors:[],warnings:[]};await Promise.all(u.map(async({name:O,callback:M,note:q})=>{try{let F=await M();if(F!=null){if(typeof F!="object")throw new Error(`Expected onStart() callback in plugin ${Oe(O)} to return an object`);let B={},P=I(F,B,"errors",er),L=I(F,B,"warnings",er);xe(F,B,`from onStart() callback in plugin ${Oe(O)}`),P!=null&&C.errors.push(...tr(P,"errors",l,O,void 0)),L!=null&&C.warnings.push(...tr(L,"warnings",l,O,void 0))}}catch(F){C.errors.push(Ur(F,i,l,q&&q(),O))}})),r(E,C)},s["on-resolve"]=async(E,v)=>{let C={},O="",M,q;for(let F of v.ids)try{({name:O,callback:M,note:q}=c[F]);let B=await M({path:v.path,importer:v.importer,namespace:v.namespace,resolveDir:v.resolveDir,kind:v.kind,pluginData:l.load(v.pluginData),with:v.with});if(B!=null){if(typeof B!="object")throw new Error(`Expected onResolve() callback in plugin ${Oe(O)} to return an object`);let P={},L=I(B,P,"pluginName",J),D=I(B,P,"path",J),j=I(B,P,"namespace",J),K=I(B,P,"suffix",J),H=I(B,P,"external",ye),Y=I(B,P,"sideEffects",ye),V=I(B,P,"pluginData",ao),Q=I(B,P,"errors",er),re=I(B,P,"warnings",er),ne=I(B,P,"watchFiles",lt),ie=I(B,P,"watchDirs",lt);xe(B,P,`from onResolve() callback in plugin ${Oe(O)}`),C.id=F,L!=null&&(C.pluginName=L),D!=null&&(C.path=D),j!=null&&(C.namespace=j),K!=null&&(C.suffix=K),H!=null&&(C.external=H),Y!=null&&(C.sideEffects=Y),V!=null&&(C.pluginData=l.store(V)),Q!=null&&(C.errors=tr(Q,"errors",l,O,void 0)),re!=null&&(C.warnings=tr(re,"warnings",l,O,void 0)),ne!=null&&(C.watchFiles=oo(ne,"watchFiles")),ie!=null&&(C.watchDirs=oo(ie,"watchDirs"));break}}catch(B){C={id:F,errors:[Ur(B,i,l,q&&q(),O)]};break}r(E,C)},s["on-load"]=async(E,v)=>{let C={},O="",M,q;for(let F of v.ids)try{({name:O,callback:M,note:q}=d[F]);let B=await M({path:v.path,namespace:v.namespace,suffix:v.suffix,pluginData:l.load(v.pluginData),with:v.with});if(B!=null){if(typeof B!="object")throw new Error(`Expected onLoad() callback in plugin ${Oe(O)} to return an object`);let P={},L=I(B,P,"pluginName",J),D=I(B,P,"contents",qp),j=I(B,P,"resolveDir",J),K=I(B,P,"pluginData",ao),H=I(B,P,"loader",J),Y=I(B,P,"errors",er),V=I(B,P,"warnings",er),Q=I(B,P,"watchFiles",lt),re=I(B,P,"watchDirs",lt);xe(B,P,`from onLoad() callback in plugin ${Oe(O)}`),C.id=F,L!=null&&(C.pluginName=L),D instanceof Uint8Array?C.contents=D:D!=null&&(C.contents=Tt(D)),j!=null&&(C.resolveDir=j),K!=null&&(C.pluginData=l.store(K)),H!=null&&(C.loader=H),Y!=null&&(C.errors=tr(Y,"errors",l,O,void 0)),V!=null&&(C.warnings=tr(V,"warnings",l,O,void 0)),Q!=null&&(C.watchFiles=oo(Q,"watchFiles")),re!=null&&(C.watchDirs=oo(re,"watchDirs"));break}}catch(B){C={id:F,errors:[Ur(B,i,l,q&&q(),O)]};break}r(E,C)};let _=(E,v)=>v([],[]);f.length>0&&(_=(E,v)=>{(async()=>{let C=[],O=[];for(let{name:M,callback:q,note:F}of f){let B,P;try{let L=await q(E);if(L!=null){if(typeof L!="object")throw new Error(`Expected onEnd() callback in plugin ${Oe(M)} to return an object`);let D={},j=I(L,D,"errors",er),K=I(L,D,"warnings",er);xe(L,D,`from onEnd() callback in plugin ${Oe(M)}`),j!=null&&(B=tr(j,"errors",l,M,void 0)),K!=null&&(P=tr(K,"warnings",l,M,void 0))}}catch(L){B=[Ur(L,i,l,F&&F(),M)]}if(B){C.push(...B);try{E.errors.push(...B)}catch{}}if(P){O.push(...P);try{E.warnings.push(...P)}catch{}}}v(C,O)})()});let b=()=>{for(let E of p)setTimeout(()=>E(),0)};return y=!0,{ok:!0,requestPlugins:A,runOnEndCallbacks:_,scheduleOnDisposeCallbacks:b}};function Kp(){let t=new Map,e=0;return{clear(){t.clear()},load(r){return t.get(r)},store(r){if(r===void 0)return-1;let n=e++;return t.set(n,r),n}}}function so(t,e,r){let n,i=!1;return()=>{if(i)return n;i=!0;try{let s=(t.stack+"").split(`
|
|
11
|
+
`);s.splice(1,1);let o=Gp(e,s,r);if(o)return n={text:t.message,location:o},n}catch{}}}function Ur(t,e,r,n,i){let s="Internal error",o=null;try{s=(t&&t.message||t)+""}catch{}try{o=Gp(e,(t.stack+"").split(`
|
|
12
|
+
`),"")}catch{}return{id:"",pluginName:i,text:s,location:o,notes:n?[n]:[],detail:r?r.store(t):-1}}function Gp(t,e,r){let n=" at ";if(t.readFileSync&&!e[0].startsWith(n)&&e[1].startsWith(n))for(let i=1;i<e.length;i++){let s=e[i];if(s.startsWith(n))for(s=s.slice(n.length);;){let o=/^(?:new |async )?\S+ \((.*)\)$/.exec(s);if(o){s=o[1];continue}if(o=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(s),o){s=o[1];continue}if(o=/^(\S+):(\d+):(\d+)$/.exec(s),o){let a;try{a=t.readFileSync(o[1],"utf8")}catch{break}let l=a.split(/\r\n|\r|\n|\u2028|\u2029/)[+o[2]-1]||"",u=+o[3]-1,f=l.slice(u,u+r.length)===r?r.length:0;return{file:o[1],namespace:"file",line:+o[2],column:Tt(l.slice(0,u)).length,length:Tt(l.slice(u,u+f)).length,lineText:l+`
|
|
13
|
+
`+e.slice(1).join(`
|
|
14
|
+
`),suggestion:""}}break}}return null}function Ii(t,e,r){let n=5;t+=e.length<1?"":` with ${e.length} error${e.length<2?"":"s"}:`+e.slice(0,n+1).map((s,o)=>{if(o===n)return`
|
|
15
|
+
...`;if(!s.location)return`
|
|
16
|
+
error: ${s.text}`;let{file:a,line:l,column:u}=s.location,f=s.pluginName?`[plugin: ${s.pluginName}] `:"";return`
|
|
17
|
+
${a}:${l}:${u}: ERROR: ${f}${s.text}`}).join("");let i=new Error(t);for(let[s,o]of[["errors",e],["warnings",r]])Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get:()=>o,set:a=>Object.defineProperty(i,s,{configurable:!0,enumerable:!0,value:a})});return i}function Ln(t,e){for(let r of t)r.detail=e.load(r.detail);return t}function Lp(t,e,r){if(t==null)return null;let n={},i=I(t,n,"file",J),s=I(t,n,"namespace",J),o=I(t,n,"line",qr),a=I(t,n,"column",qr),l=I(t,n,"length",qr),u=I(t,n,"lineText",J),f=I(t,n,"suggestion",J);if(xe(t,n,e),u){let c=u.slice(0,(a&&a>0?a:0)+(l&&l>0?l:0)+(r&&r>0?r:80));!/[\x7F-\uFFFF]/.test(c)&&!/\n/.test(u)&&(u=c)}return{file:i||"",namespace:s||"",line:o||0,column:a||0,length:l||0,lineText:u||"",suggestion:f||""}}function tr(t,e,r,n,i){let s=[],o=0;for(let a of t){let l={},u=I(a,l,"id",J),f=I(a,l,"pluginName",J),c=I(a,l,"text",J),d=I(a,l,"location",Bp),p=I(a,l,"notes",er),m=I(a,l,"detail",ao),g=`in element ${o} of "${e}"`;xe(a,l,g);let A=[];if(p)for(let y of p){let _={},b=I(y,_,"text",J),E=I(y,_,"location",Bp);xe(y,_,g),A.push({text:b||"",location:Lp(E,g,i)})}s.push({id:u||"",pluginName:f||n,text:c||"",location:Lp(d,g,i),notes:A,detail:r?r.store(m):-1}),o++}return s}function oo(t,e){let r=[];for(let n of t){if(typeof n!="string")throw new Error(`${Oe(e)} must be an array of strings`);r.push(n)}return r}function hC(t,e){let r=Object.create(null);for(let n in t){let i=t[n];if(typeof i!="string")throw new Error(`key ${Oe(n)} in object ${Oe(e)} must be a string`);r[n]=i}return r}function dC({path:t,contents:e,hash:r}){let n=null;return{path:t,contents:e,hash:r,get text(){let i=this.contents;return(n===null||i!==e)&&(e=i,n=Wr(i)),n}}}function co(t){let e=t.source;return t.flags&&(e=`(?${t.flags})${e}`),e}function pC(t){let e;try{e=Wr(t)}catch{return tC(t)}return JSON.parse(e)}var gr=le("fs"),Dp=le("os"),xt=le("path"),On=process.env.ESBUILD_BINARY_PATH||On,mC=t=>!!t&&t!=="/usr/bin/esbuild",Pp="@esbuild/darwin-arm64",Rp="@esbuild/darwin-x64",uo={"win32 arm64 LE":"@esbuild/win32-arm64","win32 ia32 LE":"@esbuild/win32-ia32","win32 x64 LE":"@esbuild/win32-x64"},fo={"aix ppc64 BE":"@esbuild/aix-ppc64","android arm64 LE":"@esbuild/android-arm64","darwin arm64 LE":"@esbuild/darwin-arm64","darwin x64 LE":"@esbuild/darwin-x64","freebsd arm64 LE":"@esbuild/freebsd-arm64","freebsd x64 LE":"@esbuild/freebsd-x64","linux arm LE":"@esbuild/linux-arm","linux arm64 LE":"@esbuild/linux-arm64","linux ia32 LE":"@esbuild/linux-ia32","linux mips64el LE":"@esbuild/linux-mips64el","linux ppc64 LE":"@esbuild/linux-ppc64","linux riscv64 LE":"@esbuild/linux-riscv64","linux s390x BE":"@esbuild/linux-s390x","linux x64 LE":"@esbuild/linux-x64","linux loong64 LE":"@esbuild/linux-loong64","netbsd arm64 LE":"@esbuild/netbsd-arm64","netbsd x64 LE":"@esbuild/netbsd-x64","openbsd arm64 LE":"@esbuild/openbsd-arm64","openbsd x64 LE":"@esbuild/openbsd-x64","sunos x64 LE":"@esbuild/sunos-x64"},Np={"android arm LE":"@esbuild/android-arm","android x64 LE":"@esbuild/android-x64","openharmony arm64 LE":"@esbuild/openharmony-arm64"};function gC(){let t,e,r=!1,n=`${process.platform} ${Dp.arch()} ${Dp.endianness()}`;if(n in uo)t=uo[n],e="esbuild.exe";else if(n in fo)t=fo[n],e="bin/esbuild";else if(n in Np)t=Np[n],e="bin/esbuild",r=!0;else throw new Error(`Unsupported platform: ${n}`);return{pkg:t,subpath:e,isWASM:r}}function AC(){let t=le.resolve("esbuild"),e=xt.dirname(xt.dirname(xt.dirname(t)));if(xt.basename(e)==="node_modules"){for(let r in fo)try{let n=fo[r];if(gr.existsSync(xt.join(e,n)))return n}catch{}for(let r in uo)try{let n=uo[r];if(gr.existsSync(xt.join(e,n)))return n}catch{}}return null}function yC(t,e){let r=xt.dirname(le.resolve("esbuild"));return xt.join(r,`downloaded-${t.replace("/","-")}-${xt.basename(e)}`)}function wC(){if(mC(On))if(!gr.existsSync(On))console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${On}`);else return{binPath:On,isWASM:!1};let{pkg:t,subpath:e,isWASM:r}=gC(),n;try{n=le.resolve(`${t}/${e}`)}catch(i){if(n=yC(t,e),!gr.existsSync(n)){try{le.resolve(t)}catch{let s=AC();if(s){let o=`
|
|
18
|
+
Specifically the "${s}" package is present but this platform
|
|
19
|
+
needs the "${t}" package instead. People often get into this
|
|
20
|
+
situation by installing esbuild on Windows or macOS and copying "node_modules"
|
|
21
|
+
into a Docker image that runs Linux, or by copying "node_modules" between
|
|
22
|
+
Windows and WSL environments.
|
|
23
|
+
|
|
24
|
+
If you are installing with npm, you can try not copying the "node_modules"
|
|
25
|
+
directory when you copy the files over, and running "npm ci" or "npm install"
|
|
26
|
+
on the destination platform after the copy. Or you could consider using yarn
|
|
27
|
+
instead of npm which has built-in support for installing a package on multiple
|
|
28
|
+
platforms simultaneously.
|
|
29
|
+
|
|
30
|
+
If you are installing with yarn, you can try listing both this platform and the
|
|
31
|
+
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
|
|
32
|
+
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
33
|
+
Keep in mind that this means multiple copies of esbuild will be present.
|
|
34
|
+
`;throw(t===Rp&&s===Pp||t===Pp&&s===Rp)&&(o=`
|
|
35
|
+
Specifically the "${s}" package is present but this platform
|
|
36
|
+
needs the "${t}" package instead. People often get into this
|
|
37
|
+
situation by installing esbuild with npm running inside of Rosetta 2 and then
|
|
38
|
+
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
|
|
39
|
+
2 is Apple's on-the-fly x86_64-to-arm64 translation service).
|
|
40
|
+
|
|
41
|
+
If you are installing with npm, you can try ensuring that both npm and node are
|
|
42
|
+
not running under Rosetta 2 and then reinstalling esbuild. This likely involves
|
|
43
|
+
changing how you installed npm and/or node. For example, installing node with
|
|
44
|
+
the universal installer here should work: https://nodejs.org/en/download/. Or
|
|
45
|
+
you could consider using yarn instead of npm which has built-in support for
|
|
46
|
+
installing a package on multiple platforms simultaneously.
|
|
47
|
+
|
|
48
|
+
If you are installing with yarn, you can try listing both "arm64" and "x64"
|
|
49
|
+
in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
|
|
50
|
+
https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
51
|
+
Keep in mind that this means multiple copies of esbuild will be present.
|
|
52
|
+
`),new Error(`
|
|
53
|
+
You installed esbuild for another platform than the one you're currently using.
|
|
54
|
+
This won't work because esbuild is written with native code and needs to
|
|
55
|
+
install a platform-specific binary executable.
|
|
56
|
+
${o}
|
|
57
|
+
Another alternative is to use the "esbuild-wasm" package instead, which works
|
|
58
|
+
the same way on all platforms. But it comes with a heavy performance cost and
|
|
59
|
+
can sometimes be 10x slower than the "esbuild" package, so you may also not
|
|
60
|
+
want to do that.
|
|
61
|
+
`)}throw new Error(`The package "${t}" could not be found, and is needed by esbuild.
|
|
62
|
+
|
|
63
|
+
If you are installing esbuild with npm, make sure that you don't specify the
|
|
64
|
+
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
|
|
65
|
+
of "package.json" is used by esbuild to install the correct binary executable
|
|
66
|
+
for your current platform.`)}throw i}}if(/\.zip\//.test(n)){let i;try{i=le("pnpapi")}catch{}if(i){let s=i.getPackageInformation(i.topLevel).packageLocation,o=xt.join(s,"node_modules",".cache","esbuild",`pnpapi-${t.replace("/","-")}-0.28.0-${xt.basename(e)}`);return gr.existsSync(o)||(gr.mkdirSync(xt.dirname(o),{recursive:!0}),gr.copyFileSync(n,o),gr.chmodSync(o,493)),{binPath:o,isWASM:r}}}return{binPath:n,isWASM:r}}var Jp=le("child_process"),bC=le("crypto"),rc=le("path"),Hr=le("fs"),_C=le("os"),vC=le("tty"),Ye;if(process.env.ESBUILD_WORKER_THREADS!=="0"){try{Ye=le("worker_threads")}catch{}let[t,e]=process.versions.node.split(".");(+t<12||+t==12&&+e<17||+t==13&&+e<13)&&(Ye=void 0)}var Tp,Li=((Tp=Ye?.workerData)==null?void 0:Tp.esbuildVersion)==="0.28.0",Vp=()=>{if(!On&&(rc.basename(__filename)!=="main.js"||rc.basename(__dirname)!=="lib"))throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
67
|
+
|
|
68
|
+
More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`);{let{binPath:t,isWASM:e}=wC();return e?["node",[t]]:[t,[]]}},Oi=()=>vC.isatty(2),EC={readFile(t,e){try{let r=Hr.readFileSync(t,"utf8");try{Hr.unlinkSync(t)}catch{}e(null,r)}catch(r){e(r,null)}},writeFile(t,e){try{let r=Yp();Hr.writeFileSync(r,t),e(r)}catch{e(null)}}},CC={readFile(t,e){try{Hr.readFile(t,"utf8",(r,n)=>{try{Hr.unlink(t,()=>e(r,n))}catch{e(r,n)}})}catch(r){e(r,null)}},writeFile(t,e){try{let r=Yp();Hr.writeFile(r,t,n=>e(n!==null?null:r))}catch{e(null)}}},xC="0.28.0",SC=t=>Kr().build(t),kC=t=>Kr().context(t),IC=(t,e)=>Kr().transform(t,e),OC=(t,e)=>Kr().formatMessages(t,e),BC=(t,e)=>Kr().analyzeMetafile(t,e),LC=t=>{if(Ye&&!Li)return ze||(ze=go(Ye)),ze.buildSync(t);let e;return mo(r=>r.buildOrContext({callName:"buildSync",refs:null,options:t,isTTY:Oi(),defaultWD:$r,callback:(n,i)=>{if(n)throw n;e=i}})),e},DC=(t,e)=>{if(Ye&&!Li)return ze||(ze=go(Ye)),ze.transformSync(t,e);let r;return mo(n=>n.transform({callName:"transformSync",refs:null,input:t,options:e||{},isTTY:Oi(),fs:EC,callback:(i,s)=>{if(i)throw i;r=s}})),r},PC=(t,e)=>{if(Ye&&!Li)return ze||(ze=go(Ye)),ze.formatMessagesSync(t,e);let r;return mo(n=>n.formatMessages({callName:"formatMessagesSync",refs:null,messages:t,options:e,callback:(i,s)=>{if(i)throw i;r=s}})),r},RC=(t,e)=>{if(Ye&&!Li)return ze||(ze=go(Ye)),ze.analyzeMetafileSync(t,e);let r;return mo(n=>n.analyzeMetafile({callName:"analyzeMetafileSync",refs:null,metafile:typeof t=="string"?t:JSON.stringify(t),options:e,callback:(i,s)=>{if(i)throw i;r=s}})),r},NC=()=>(ho&&ho(),ze&&ze.stop(),Promise.resolve()),nc=!1,TC=t=>{if(t=aC(t||{}),t.wasmURL)throw new Error('The "wasmURL" option only works in the browser');if(t.wasmModule)throw new Error('The "wasmModule" option only works in the browser');if(t.worker)throw new Error('The "worker" option only works in the browser');if(nc)throw new Error('Cannot call "initialize" more than once');return Kr(),nc=!0,Promise.resolve()},$r=process.cwd(),ki,ho,Kr=()=>{if(ki)return ki;let[t,e]=Vp(),r=Jp.spawn(t,e.concat("--service=0.28.0","--ping"),{windowsHide:!0,stdio:["pipe","pipe","inherit"],cwd:$r}),{readFromStdout:n,afterClose:i,service:s}=Wp({writeToStdin(f){r.stdin.write(f,c=>{c&&i(c)})},readFileSync:Hr.readFileSync,isSync:!1,hasFS:!0,esbuild:Bi});r.stdin.on("error",i),r.on("error",i);let o=r.stdin,a=r.stdout;a.on("data",n),a.on("end",i),ho=()=>{o.destroy(),a.destroy(),r.kill(),nc=!1,ki=void 0,ho=void 0};let l=0;r.unref(),o.unref&&o.unref(),a.unref&&a.unref();let u={ref(){++l===1&&r.ref()},unref(){--l===0&&r.unref()}};return ki={build:f=>new Promise((c,d)=>{s.buildOrContext({callName:"build",refs:u,options:f,isTTY:Oi(),defaultWD:$r,callback:(p,m)=>p?d(p):c(m)})}),context:f=>new Promise((c,d)=>s.buildOrContext({callName:"context",refs:u,options:f,isTTY:Oi(),defaultWD:$r,callback:(p,m)=>p?d(p):c(m)})),transform:(f,c)=>new Promise((d,p)=>s.transform({callName:"transform",refs:u,input:f,options:c||{},isTTY:Oi(),fs:CC,callback:(m,g)=>m?p(m):d(g)})),formatMessages:(f,c)=>new Promise((d,p)=>s.formatMessages({callName:"formatMessages",refs:u,messages:f,options:c,callback:(m,g)=>m?p(m):d(g)})),analyzeMetafile:(f,c)=>new Promise((d,p)=>s.analyzeMetafile({callName:"analyzeMetafile",refs:u,metafile:typeof f=="string"?f:JSON.stringify(f),options:c,callback:(m,g)=>m?p(m):d(g)}))},ki},mo=t=>{let[e,r]=Vp(),n=new Uint8Array,{readFromStdout:i,afterClose:s,service:o}=Wp({writeToStdin(l){if(n.length!==0)throw new Error("Must run at most one command");n=l},isSync:!0,hasFS:!0,esbuild:Bi});t(o);let a=Jp.execFileSync(e,r.concat("--service=0.28.0"),{cwd:$r,windowsHide:!0,input:n,maxBuffer:+process.env.ESBUILD_MAX_BUFFER||16*1024*1024});i(a),s(null)},Yp=()=>rc.join(_C.tmpdir(),`esbuild-${bC.randomBytes(32).toString("hex")}`),ze=null,go=t=>{let{port1:e,port2:r}=new t.MessageChannel,n=new t.Worker(__filename,{workerData:{workerPort:r,defaultWD:$r,esbuildVersion:"0.28.0"},transferList:[r],execArgv:[]}),i=0,s=u=>{let f=new Error(`Build failed with 1 error:
|
|
69
|
+
error: ${u}`),c=[{id:"",pluginName:"",text:u,location:null,notes:[],detail:void 0}];return f.errors=c,f.warnings=[],f},o=u=>{if(!u)return;let f=u.plugins;if(f&&f.length>0)throw s("Cannot use plugins in synchronous API calls")},a=(u,f)=>{for(let c in f)u[c]=f[c]},l=(u,f)=>{let c=i++,d=new SharedArrayBuffer(8),p=new Int32Array(d),m={sharedBuffer:d,id:c,command:u,args:f};n.postMessage(m);let g=Atomics.wait(p,0,0);if(g!=="ok"&&g!=="not-equal")throw new Error("Internal error: Atomics.wait() failed: "+g);let{message:{id:A,resolve:y,reject:_,properties:b}}=t.receiveMessageOnPort(e);if(c!==A)throw new Error(`Internal error: Expected id ${c} but got id ${A}`);if(_)throw a(_,b),_;return y};return n.unref(),{buildSync(u){return o(u),l("build",[u])},transformSync(u,f){return l("transform",[u,f])},formatMessagesSync(u,f){return l("formatMessages",[u,f])},analyzeMetafileSync(u,f){return l("analyzeMetafile",[u,f])},stop(){n.terminate(),ze=null}}},FC=()=>{let t=Ye.workerData.workerPort,e=Ye.parentPort,r=n=>{let i={};if(n&&typeof n=="object")for(let s in n)i[s]=n[s];return i};try{let n=Kr();$r=Ye.workerData.defaultWD,e.on("message",i=>{(async()=>{let{sharedBuffer:s,id:o,command:a,args:l}=i,u=new Int32Array(s);try{switch(a){case"build":t.postMessage({id:o,resolve:await n.build(l[0])});break;case"transform":t.postMessage({id:o,resolve:await n.transform(l[0],l[1])});break;case"formatMessages":t.postMessage({id:o,resolve:await n.formatMessages(l[0],l[1])});break;case"analyzeMetafile":t.postMessage({id:o,resolve:await n.analyzeMetafile(l[0],l[1])});break;default:throw new Error(`Invalid command: ${a}`)}}catch(f){t.postMessage({id:o,reject:f,properties:r(f)})}Atomics.add(u,0,1),Atomics.notify(u,0,1/0)})()})}catch(n){e.on("message",i=>{let{sharedBuffer:s,id:o}=i,a=new Int32Array(s);t.postMessage({id:o,reject:n,properties:r(n)}),Atomics.add(a,0,1),Atomics.notify(a,0,1/0)})}};Li&&FC();var QC=Bi});var tm={};Wh(tm,{ImportType:()=>ac,init:()=>em,parse:()=>lc});function lc(t,e="@"){if(!ue)return em.then(()=>lc(t));let r=t.length+1,n=(ue.__heap_base.value||ue.__heap_base)+4*r-ue.memory.buffer.byteLength;n>0&&ue.memory.grow(Math.ceil(n/65536));let i=ue.sa(r-1);if((jC?Zp:Xp)(t,new Uint16Array(ue.memory.buffer,i,r)),!ue.parse())throw Object.assign(new Error(`Parse error ${e}:${t.slice(0,ue.e()).split(`
|
|
70
|
+
`).length}:${ue.e()-t.lastIndexOf(`
|
|
71
|
+
`,ue.e()-1)}`),{idx:ue.e()});let s=[],o=[];for(;ue.ri();){let l=ue.is(),u=ue.ie(),f=ue.it(),c=ue.ai(),d=ue.id(),p=ue.ss(),m=ue.se(),g;ue.ip()&&(g=a(t.slice(d===-1?l-1:l,d===-1?u+1:u))),s.push({n:g,t:f,s:l,e:u,ss:p,se:m,d,a:c})}for(;ue.re();){let l=ue.es(),u=ue.ee(),f=ue.els(),c=ue.ele(),d=t.slice(l,u),p=d[0],m=f<0?void 0:t.slice(f,c),g=m?m[0]:"";o.push({s:l,e:u,ls:f,le:c,n:p==='"'||p==="'"?a(d):d,ln:g==='"'||g==="'"?a(m):m})}function a(l){try{return(0,eval)(l)}catch{}}return Ao(a,"k"),[s,o,!!ue.f(),!!ue.ms()]}function Xp(t,e){let r=t.length,n=0;for(;n<r;){let i=t.charCodeAt(n);e[n++]=(255&i)<<8|i>>>8}}function Zp(t,e){let r=t.length,n=0;for(;n<r;)e[n]=t.charCodeAt(n++)}var MC,Ao,ac,jC,ue,em,oc,rm=Pe(()=>{MC=Object.defineProperty,Ao=(t,e)=>MC(t,"name",{value:e,configurable:!0});(function(t){t[t.Static=1]="Static",t[t.Dynamic=2]="Dynamic",t[t.ImportMeta=3]="ImportMeta",t[t.StaticSourcePhase=4]="StaticSourcePhase",t[t.DynamicSourcePhase=5]="DynamicSourcePhase"})(ac||(ac={}));jC=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;Ao(lc,"parse");Ao(Xp,"Q");Ao(Zp,"B");em=WebAssembly.compile((oc="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKm0EwaAEBf0EAIAA2AoAKQQAoAtwJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgKECkEAIAA2AogKQQBBADYC4AlBAEEANgLwCUEAQQA2AugJQQBBADYC5AlBAEEANgL4CUEAQQA2AuwJIAEL0wEBA39BACgC8AkhBEEAQQAoAogKIgU2AvAJQQAgBDYC9AlBACAFQSRqNgKICiAEQSBqQeAJIAQbIAU2AgBBACgC1AkhBEEAKALQCSEGIAUgATYCACAFIAA2AgggBSACIAJBAmpBACAGIANGIgAbIAQgA0YiBBs2AgwgBSADNgIUIAVBADYCECAFIAI2AgQgBUEANgIgIAVBA0EBQQIgABsgBBs2AhwgBUEAKALQCSADRiICOgAYAkACQCACDQBBACgC1AkgA0cNAQtBAEEBOgCMCgsLXgEBf0EAKAL4CSIEQRBqQeQJIAQbQQAoAogKIgQ2AgBBACAENgL4CUEAIARBFGo2AogKQQBBAToAjAogBEEANgIQIAQgAzYCDCAEIAI2AgggBCABNgIEIAQgADYCAAsIAEEAKAKQCgsVAEEAKALoCSgCAEEAKALcCWtBAXULHgEBf0EAKALoCSgCBCIAQQAoAtwJa0EBdUF/IAAbCxUAQQAoAugJKAIIQQAoAtwJa0EBdQseAQF/QQAoAugJKAIMIgBBACgC3AlrQQF1QX8gABsLCwBBACgC6AkoAhwLHgEBf0EAKALoCSgCECIAQQAoAtwJa0EBdUF/IAAbCzsBAX8CQEEAKALoCSgCFCIAQQAoAtAJRw0AQX8PCwJAIABBACgC1AlHDQBBfg8LIABBACgC3AlrQQF1CwsAQQAoAugJLQAYCxUAQQAoAuwJKAIAQQAoAtwJa0EBdQsVAEEAKALsCSgCBEEAKALcCWtBAXULHgEBf0EAKALsCSgCCCIAQQAoAtwJa0EBdUF/IAAbCx4BAX9BACgC7AkoAgwiAEEAKALcCWtBAXVBfyAAGwslAQF/QQBBACgC6AkiAEEgakHgCSAAGygCACIANgLoCSAAQQBHCyUBAX9BAEEAKALsCSIAQRBqQeQJIAAbKAIAIgA2AuwJIABBAEcLCABBAC0AlAoLCABBAC0AjAoL3Q0BBX8jAEGA0ABrIgAkAEEAQQE6AJQKQQBBACgC2Ak2ApwKQQBBACgC3AlBfmoiATYCsApBACABQQAoAoAKQQF0aiICNgK0CkEAQQA6AIwKQQBBADsBlgpBAEEAOwGYCkEAQQA6AKAKQQBBADYCkApBAEEAOgD8CUEAIABBgBBqNgKkCkEAIAA2AqgKQQBBADoArAoCQAJAAkACQANAQQAgAUECaiIDNgKwCiABIAJPDQECQCADLwEAIgJBd2pBBUkNAAJAAkACQAJAAkAgAkGbf2oOBQEICAgCAAsgAkEgRg0EIAJBL0YNAyACQTtGDQIMBwtBAC8BmAoNASADEBVFDQEgAUEEakGCCEEKEC8NARAWQQAtAJQKDQFBAEEAKAKwCiIBNgKcCgwHCyADEBVFDQAgAUEEakGMCEEKEC8NABAXC0EAQQAoArAKNgKcCgwBCwJAIAEvAQQiA0EqRg0AIANBL0cNBBAYDAELQQEQGQtBACgCtAohAkEAKAKwCiEBDAALC0EAIQIgAyEBQQAtAPwJDQIMAQtBACABNgKwCkEAQQA6AJQKCwNAQQAgAUECaiIDNgKwCgJAAkACQAJAAkACQAJAIAFBACgCtApPDQAgAy8BACICQXdqQQVJDQYCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoQDwYPDw8PBQECAAsCQAJAAkACQCACQaB/ag4KCxISAxIBEhISAgALIAJBhX9qDgMFEQYJC0EALwGYCg0QIAMQFUUNECABQQRqQYIIQQoQLw0QEBYMEAsgAxAVRQ0PIAFBBGpBjAhBChAvDQ8QFwwPCyADEBVFDQ4gASkABELsgISDsI7AOVINDiABLwEMIgNBd2oiAUEXSw0MQQEgAXRBn4CABHFFDQwMDQtBAEEALwGYCiIBQQFqOwGYCkEAKAKkCiABQQN0aiIBQQE2AgAgAUEAKAKcCjYCBAwNC0EALwGYCiIDRQ0JQQAgA0F/aiIDOwGYCkEALwGWCiICRQ0MQQAoAqQKIANB//8DcUEDdGooAgBBBUcNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQBBKUcNAEEAKALwCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAvQJIgM2AvAJAkAgA0UNACADQQA2AiAMAQtBAEEANgLgCQtBAEEALwGYCiIDQQFqOwGYCkEAKAKkCiADQQN0aiIDQQZBAkEALQCsChs2AgAgAyABNgIEQQBBADoArAoMCwtBAC8BmAoiAUUNB0EAIAFBf2oiATsBmApBACgCpAogAUH//wNxQQN0aigCAEEERg0EDAoLQScQGgwJC0EiEBoMCAsgAkEvRw0HAkACQCABLwEEIgFBKkYNACABQS9HDQEQGAwKC0EBEBkMCQsCQAJAAkACQEEAKAKcCiIBLwEAIgMQG0UNAAJAAkAgA0FVag4EAAkBAwkLIAFBfmovAQBBK0YNAwwICyABQX5qLwEAQS1GDQIMBwsgA0EpRw0BQQAoAqQKQQAvAZgKIgJBA3RqKAIEEBxFDQIMBgsgAUF+ai8BAEFQakH//wNxQQpPDQULQQAvAZgKIQILAkACQCACQf//A3EiAkUNACADQeYARw0AQQAoAqQKIAJBf2pBA3RqIgQoAgBBAUcNACABQX5qLwEAQe8ARw0BIAQoAgRBlghBAxAdRQ0BDAULIANB/QBHDQBBACgCpAogAkEDdGoiAigCBBAeDQQgAigCAEEGRg0ECyABEB8NAyADRQ0DIANBL0ZBAC0AoApBAEdxDQMCQEEAKAL4CSICRQ0AIAEgAigCAEkNACABIAIoAgRNDQQLIAFBfmohAUEAKALcCSECAkADQCABQQJqIgQgAk0NAUEAIAE2ApwKIAEvAQAhAyABQX5qIgQhASADECBFDQALIARBAmohBAsCQCADQf//A3EQIUUNACAEQX5qIQECQANAIAFBAmoiAyACTQ0BQQAgATYCnAogAS8BACEDIAFBfmoiBCEBIAMQIQ0ACyAEQQJqIQMLIAMQIg0EC0EAQQE6AKAKDAcLQQAoAqQKQQAvAZgKIgFBA3QiA2pBACgCnAo2AgRBACABQQFqOwGYCkEAKAKkCiADakEDNgIACxAjDAULQQAtAPwJQQAvAZYKQQAvAZgKcnJFIQIMBwsQJEEAQQA6AKAKDAMLECVBACECDAULIANBoAFHDQELQQBBAToArAoLQQBBACgCsAo2ApwKC0EAKAKwCiEBDAALCyAAQYDQAGokACACCxoAAkBBACgC3AkgAEcNAEEBDwsgAEF+ahAmC/4KAQZ/QQBBACgCsAoiAEEMaiIBNgKwCkEAKAL4CSECQQEQKSEDAkACQAJAAkACQAJAAkACQAJAQQAoArAKIgQgAUcNACADEChFDQELAkACQAJAAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKwCkEBECkhA0EAKAKwCiEEA0ACQAJAIANB//8DcSIDQSJGDQAgA0EnRg0AIAMQLBpBACgCsAohAwwBCyADEBpBAEEAKAKwCkECaiIDNgKwCgtBARApGgJAIAQgAxAtIgNBLEcNAEEAQQAoArAKQQJqNgKwCkEBECkhAwsgA0H9AEYNA0EAKAKwCiIFIARGDQ8gBSEEIAVBACgCtApNDQAMDwsLQQAgBEECajYCsApBARApGkEAKAKwCiIDIAMQLRoMAgtBAEEAOgCUCgJAAkACQAJAAkACQCADQZ9/ag4MAgsEAQsDCwsLCwsFAAsgA0H2AEYNBAwKC0EAIARBDmoiAzYCsAoCQAJAAkBBARApQZ9/ag4GABICEhIBEgtBACgCsAoiBSkAAkLzgOSD4I3AMVINESAFLwEKECFFDRFBACAFQQpqNgKwCkEAECkaC0EAKAKwCiIFQQJqQbIIQQ4QLw0QIAUvARAiAkF3aiIBQRdLDQ1BASABdEGfgIAEcUUNDQwOC0EAKAKwCiIFKQACQuyAhIOwjsA5Ug0PIAUvAQoiAkF3aiIBQRdNDQYMCgtBACAEQQpqNgKwCkEAECkaQQAoArAKIQQLQQAgBEEQajYCsAoCQEEBECkiBEEqRw0AQQBBACgCsApBAmo2ArAKQQEQKSEEC0EAKAKwCiEDIAQQLBogA0EAKAKwCiIEIAMgBBACQQBBACgCsApBfmo2ArAKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQIEUNAEEAIARBCmo2ArAKQQEQKSEEQQAoArAKIQMgBBAsGiADQQAoArAKIgQgAyAEEAJBAEEAKAKwCkF+ajYCsAoPC0EAIARBBGoiBDYCsAoLQQAgBEEGajYCsApBAEEAOgCUCkEBECkhBEEAKAKwCiEDIAQQLCEEQQAoArAKIQIgBEHf/wNxIgFB2wBHDQNBACACQQJqNgKwCkEBECkhBUEAKAKwCiEDQQAhBAwEC0EAQQE6AIwKQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0AQQAgA0EIajYCsAogAEEBEClBABArIAJBEGpB5AkgAhshAwNAIAMoAgAiA0UNBSADQgA3AgggA0EQaiEDDAALC0EAIANBfmo2ArAKDAMLQQEgAXRBn4CABHFFDQMMBAtBASEECwNAAkACQCAEDgIAAQELIAVB//8DcRAsGkEBIQQMAQsCQAJAQQAoArAKIgQgA0YNACADIAQgAyAEEAJBARApIQQCQCABQdsARw0AIARBIHJB/QBGDQQLQQAoArAKIQMCQCAEQSxHDQBBACADQQJqNgKwCkEBECkhBUEAKAKwCiEDIAVBIHJB+wBHDQILQQAgA0F+ajYCsAoLIAFB2wBHDQJBACACQX5qNgKwCg8LQQAhBAwACwsPCyACQaABRg0AIAJB+wBHDQQLQQAgBUEKajYCsApBARApIgVB+wBGDQMMAgsCQCACQVhqDgMBAwEACyACQaABRw0CC0EAIAVBEGo2ArAKAkBBARApIgVBKkcNAEEAQQAoArAKQQJqNgKwCkEBECkhBQsgBUEoRg0BC0EAKAKwCiEBIAUQLBpBACgCsAoiBSABTQ0AIAQgAyABIAUQAkEAQQAoArAKQX5qNgKwCg8LIAQgA0EAQQAQAkEAIARBDGo2ArAKDwsQJQvcCAEGf0EAIQBBAEEAKAKwCiIBQQxqIgI2ArAKQQEQKSEDQQAoArAKIQQCQAJAAkACQAJAAkACQAJAIANBLkcNAEEAIARBAmo2ArAKAkBBARApIgNB8wBGDQAgA0HtAEcNB0EAKAKwCiIDQQJqQZwIQQYQLw0HAkBBACgCnAoiBBAqDQAgBC8BAEEuRg0ICyABIAEgA0EIakEAKALUCRABDwtBACgCsAoiA0ECakGiCEEKEC8NBgJAQQAoApwKIgQQKg0AIAQvAQBBLkYNBwsgA0EMaiEDDAELIANB8wBHDQEgBCACTQ0BQQYhAEEAIQIgBEECakGiCEEKEC8NAiAEQQxqIQMCQCAELwEMIgVBd2oiBEEXSw0AQQEgBHRBn4CABHENAQsgBUGgAUcNAgtBACADNgKwCkEBIQBBARApIQMLAkACQAJAAkAgA0H7AEYNACADQShHDQFBACgCpApBAC8BmAoiA0EDdGoiBEEAKAKwCjYCBEEAIANBAWo7AZgKIARBBTYCAEEAKAKcCi8BAEEuRg0HQQBBACgCsAoiBEECajYCsApBARApIQMgAUEAKAKwCkEAIAQQAQJAAkAgAA0AQQAoAvAJIQQMAQtBACgC8AkiBEEFNgIcC0EAQQAvAZYKIgBBAWo7AZYKQQAoAqgKIABBAnRqIAQ2AgACQCADQSJGDQAgA0EnRg0AQQBBACgCsApBfmo2ArAKDwsgAxAaQQBBACgCsApBAmoiAzYCsAoCQAJAAkBBARApQVdqDgQBAgIAAgtBAEEAKAKwCkECajYCsApBARApGkEAKALwCSIEIAM2AgQgBEEBOgAYIARBACgCsAoiAzYCEEEAIANBfmo2ArAKDwtBACgC8AkiBCADNgIEIARBAToAGEEAQQAvAZgKQX9qOwGYCiAEQQAoArAKQQJqNgIMQQBBAC8BlgpBf2o7AZYKDwtBAEEAKAKwCkF+ajYCsAoPCyAADQJBACgCsAohA0EALwGYCg0BA0ACQAJAAkAgA0EAKAK0Ck8NAEEBECkiA0EiRg0BIANBJ0YNASADQf0ARw0CQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0JC0EAIANBCGo2ArAKAkBBARApIgNBIkYNACADQSdHDQkLIAEgA0EAECsPCyADEBoLQQBBACgCsApBAmoiAzYCsAoMAAsLIAANAUEGIQBBACECAkAgA0FZag4EBAMDBAALIANBIkYNAwwCC0EAIANBfmo2ArAKDwtBDCEAQQEhAgtBACgCsAoiAyABIABBAXRqRw0AQQAgA0F+ajYCsAoPC0EALwGYCg0CQQAoArAKIQNBACgCtAohAANAIAMgAE8NAQJAAkAgAy8BACIEQSdGDQAgBEEiRw0BCyABIAQgAhArDwtBACADQQJqIgM2ArAKDAALCxAlCw8LQQBBACgCsApBfmo2ArAKC0cBA39BACgCsApBAmohAEEAKAK0CiEBAkADQCAAIgJBfmogAU8NASACQQJqIQAgAi8BAEF2ag4EAQAAAQALC0EAIAI2ArAKC5gBAQN/QQBBACgCsAoiAUECajYCsAogAUEGaiEBQQAoArQKIQIDQAJAAkACQCABQXxqIAJPDQAgAUF+ai8BACEDAkACQCAADQAgA0EqRg0BIANBdmoOBAIEBAIECyADQSpHDQMLIAEvAQBBL0cNAkEAIAFBfmo2ArAKDAELIAFBfmohAQtBACABNgKwCg8LIAFBAmohAQwACwuIAQEEf0EAKAKwCiEBQQAoArQKIQICQAJAA0AgASIDQQJqIQEgAyACTw0BIAEvAQAiBCAARg0CAkAgBEHcAEYNACAEQXZqDgQCAQECAQsgA0EEaiEBIAMvAQRBDUcNACADQQZqIAEgAy8BBkEKRhshAQwACwtBACABNgKwChAlDwtBACABNgKwCgtsAQF/AkACQCAAQV9qIgFBBUsNAEEBIAF0QTFxDQELIABBRmpB//8DcUEGSQ0AIABBKUcgAEFYakH//wNxQQdJcQ0AAkAgAEGlf2oOBAEAAAEACyAAQf0ARyAAQYV/akH//wNxQQRJcQ8LQQELLgEBf0EBIQECQCAAQaYJQQUQHQ0AIABBlghBAxAdDQAgAEGwCUECEB0hAQsgAQtGAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC3AkiBUkNACAAIAEgAhAvDQACQCAAIAVHDQBBAQ8LIAQQJiEDCyADC4MBAQJ/QQEhAQJAAkACQAJAAkACQCAALwEAIgJBRWoOBAUEBAEACwJAIAJBm39qDgQDBAQCAAsgAkEpRg0EIAJB+QBHDQMgAEF+akG8CUEGEB0PCyAAQX5qLwEAQT1GDwsgAEF+akG0CUEEEB0PCyAAQX5qQcgJQQMQHQ8LQQAhAQsgAQu0AwECf0EAIQECQAJAAkACQAJAAkACQAJAAkACQCAALwEAQZx/ag4UAAECCQkJCQMJCQQFCQkGCQcJCQgJCwJAAkAgAEF+ai8BAEGXf2oOBAAKCgEKCyAAQXxqQcoIQQIQHQ8LIABBfGpBzghBAxAdDwsCQAJAAkAgAEF+ai8BAEGNf2oOAwABAgoLAkAgAEF8ai8BACICQeEARg0AIAJB7ABHDQogAEF6akHlABAnDwsgAEF6akHjABAnDwsgAEF8akHUCEEEEB0PCyAAQXxqQdwIQQYQHQ8LIABBfmovAQBB7wBHDQYgAEF8ai8BAEHlAEcNBgJAIABBemovAQAiAkHwAEYNACACQeMARw0HIABBeGpB6AhBBhAdDwsgAEF4akH0CEECEB0PCyAAQX5qQfgIQQQQHQ8LQQEhASAAQX5qIgBB6QAQJw0EIABBgAlBBRAdDwsgAEF+akHkABAnDwsgAEF+akGKCUEHEB0PCyAAQX5qQZgJQQQQHQ8LAkAgAEF+ai8BACICQe8ARg0AIAJB5QBHDQEgAEF8akHuABAnDwsgAEF8akGgCUEDEB0hAQsgAQs0AQF/QQEhAQJAIABBd2pB//8DcUEFSQ0AIABBgAFyQaABRg0AIABBLkcgABAocSEBCyABCzABAX8CQAJAIABBd2oiAUEXSw0AQQEgAXRBjYCABHENAQsgAEGgAUYNAEEADwtBAQtOAQJ/QQAhAQJAAkAgAC8BACICQeUARg0AIAJB6wBHDQEgAEF+akH4CEEEEB0PCyAAQX5qLwEAQfUARw0AIABBfGpB3AhBBhAdIQELIAEL3gEBBH9BACgCsAohAEEAKAK0CiEBAkACQAJAA0AgACICQQJqIQAgAiABTw0BAkACQAJAIAAvAQAiA0Gkf2oOBQIDAwMBAAsgA0EkRw0CIAIvAQRB+wBHDQJBACACQQRqIgA2ArAKQQBBAC8BmAoiAkEBajsBmApBACgCpAogAkEDdGoiAkEENgIAIAIgADYCBA8LQQAgADYCsApBAEEALwGYCkF/aiIAOwGYCkEAKAKkCiAAQf//A3FBA3RqKAIAQQNHDQMMBAsgAkEEaiEADAALC0EAIAA2ArAKCxAlCwtwAQJ/AkACQANAQQBBACgCsAoiAEECaiIBNgKwCiAAQQAoArQKTw0BAkACQAJAIAEvAQAiAUGlf2oOAgECAAsCQCABQXZqDgQEAwMEAAsgAUEvRw0CDAQLEC4aDAELQQAgAEEEajYCsAoMAAsLECULCzUBAX9BAEEBOgD8CUEAKAKwCiEAQQBBACgCtApBAmo2ArAKQQAgAEEAKALcCWtBAXU2ApAKC0MBAn9BASEBAkAgAC8BACICQXdqQf//A3FBBUkNACACQYABckGgAUYNAEEAIQEgAhAoRQ0AIAJBLkcgABAqcg8LIAELPQECf0EAIQICQEEAKALcCSIDIABLDQAgAC8BACABRw0AAkAgAyAARw0AQQEPCyAAQX5qLwEAECAhAgsgAgtoAQJ/QQEhAQJAAkAgAEFfaiICQQVLDQBBASACdEExcQ0BCyAAQfj/A3FBKEYNACAAQUZqQf//A3FBBkkNAAJAIABBpX9qIgJBA0sNACACQQFHDQELIABBhX9qQf//A3FBBEkhAQsgAQucAQEDf0EAKAKwCiEBAkADQAJAAkAgAS8BACICQS9HDQACQCABLwECIgFBKkYNACABQS9HDQQQGAwCCyAAEBkMAQsCQAJAIABFDQAgAkF3aiIBQRdLDQFBASABdEGfgIAEcUUNAQwCCyACECFFDQMMAQsgAkGgAUcNAgtBAEEAKAKwCiIDQQJqIgE2ArAKIANBACgCtApJDQALCyACCzEBAX9BACEBAkAgAC8BAEEuRw0AIABBfmovAQBBLkcNACAAQXxqLwEAQS5GIQELIAELnAQBAX8CQCABQSJGDQAgAUEnRg0AECUPC0EAKAKwCiEDIAEQGiAAIANBAmpBACgCsApBACgC0AkQAQJAIAJFDQBBACgC8AlBBDYCHAtBAEEAKAKwCkECajYCsAoCQAJAAkACQEEAECkiAUHhAEYNACABQfcARg0BQQAoArAKIQEMAgtBACgCsAoiAUECakHACEEKEC8NAUEGIQAMAgtBACgCsAoiAS8BAkHpAEcNACABLwEEQfQARw0AQQQhACABLwEGQegARg0BC0EAIAFBfmo2ArAKDwtBACABIABBAXRqNgKwCgJAQQEQKUH7AEYNAEEAIAE2ArAKDwtBACgCsAoiAiEAA0BBACAAQQJqNgKwCgJAAkACQEEBECkiAEEiRg0AIABBJ0cNAUEnEBpBAEEAKAKwCkECajYCsApBARApIQAMAgtBIhAaQQBBACgCsApBAmo2ArAKQQEQKSEADAELIAAQLCEACwJAIABBOkYNAEEAIAE2ArAKDwtBAEEAKAKwCkECajYCsAoCQEEBECkiAEEiRg0AIABBJ0YNAEEAIAE2ArAKDwsgABAaQQBBACgCsApBAmo2ArAKAkACQEEBECkiAEEsRg0AIABB/QBGDQFBACABNgKwCg8LQQBBACgCsApBAmo2ArAKQQEQKUH9AEYNAEEAKAKwCiEADAELC0EAKALwCSIBIAI2AhAgAUEAKAKwCkECajYCDAttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARAoDQJBACECQQBBACgCsAoiAEECajYCsAogAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC6sBAQR/AkACQEEAKAKwCiICLwEAIgNB4QBGDQAgASEEIAAhBQwBC0EAIAJBBGo2ArAKQQEQKSECQQAoArAKIQUCQAJAIAJBIkYNACACQSdGDQAgAhAsGkEAKAKwCiEEDAELIAIQGkEAQQAoArAKQQJqIgQ2ArAKC0EBECkhA0EAKAKwCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKwCiEAQQAoArQKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKwChAlQQAPC0EAIAI2ArAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=",typeof Buffer<"u"?Buffer.from(oc,"base64"):Uint8Array.from(atob(oc),t=>t.charCodeAt(0)))).then(WebAssembly.instantiate).then(({exports:t})=>{ue=t})});var Ji=R(gu=>{var zo=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}},mu=class extends zo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};gu.CommanderError=zo;gu.InvalidArgumentError=mu});var Xo=R(yu=>{var{InvalidArgumentError:Ek}=Ji(),Au=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 Ek(`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 Ck(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}yu.Argument=Au;yu.humanReadableArgName=Ck});var _u=R(bu=>{var{humanReadableArgName:xk}=Xo(),wu=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=>xk(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(c,d){return r.formatItem(c,n,d,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(c=>s(r.styleArgumentTerm(r.argumentTerm(c)),r.styleArgumentDescription(r.argumentDescription(c))));l.length>0&&(o=o.concat([r.styleTitle("Arguments:"),...l,""]));let u=r.visibleOptions(e).map(c=>s(r.styleOptionTerm(r.optionTerm(c)),r.styleOptionDescription(r.optionDescription(c))));if(u.length>0&&(o=o.concat([r.styleTitle("Options:"),...u,""])),r.showGlobalOptions){let c=r.visibleGlobalOptions(e).map(d=>s(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));c.length>0&&(o=o.concat([r.styleTitle("Global Options:"),...c,""]))}let f=r.visibleCommands(e).map(c=>s(r.styleSubcommandTerm(r.subcommandTerm(c)),r.styleSubcommandDescription(r.subcommandDescription(c))));return f.length>0&&(o=o.concat([r.styleTitle("Commands:"),...f,""])),o.join(`
|
|
72
|
+
`)}displayWidth(e){return b0(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,c;return f<this.minWidthToWrap||i.preformatted(n)?c=n:c=i.boxWrap(n,f).replace(/\n/g,`
|
|
73
|
+
`+" ".repeat(r+l)),o+a+" ".repeat(l)+c.replace(/\n/g,`
|
|
74
|
+
${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()],u=this.displayWidth(l[0]);a.forEach(f=>{let c=this.displayWidth(f);if(u+c<=r){l.push(f),u+=c;return}s.push(l.join(""));let d=f.trimStart();l=[d],u=this.displayWidth(d)}),s.push(l.join(""))}),s.join(`
|
|
75
|
+
`)}};function b0(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}bu.Help=wu;bu.stripColor=b0});var xu=R(Cu=>{var{InvalidArgumentError:Sk}=Ji(),vu=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=kk(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 Sk(`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?_0(this.name().replace(/^no-/,"")):_0(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Eu=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 _0(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function kk(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}
|
|
76
|
+
- a short flag is a single dash and a single character
|
|
77
|
+
- either use a single dash and a single character (for a short flag)
|
|
78
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
|
|
79
|
+
- too many short flags`):i.test(o)?new Error(`${a}
|
|
80
|
+
- too many long flags`):new Error(`${a}
|
|
81
|
+
- 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}}Cu.Option=vu;Cu.DualOptions=Eu});var E0=R(v0=>{function Ik(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 Ok(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=Ik(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?`
|
|
82
|
+
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
83
|
+
(Did you mean ${n[0]}?)`:""}v0.suggestSimilar=Ok});var k0=R(Bu=>{var Bk=le("node:events").EventEmitter,Su=le("node:child_process"),ir=le("node:path"),Zo=le("node:fs"),ce=le("node:process"),{Argument:Lk,humanReadableArgName:Dk}=Xo(),{CommanderError:ku}=Ji(),{Help:Pk,stripColor:Rk}=_u(),{Option:C0,DualOptions:Nk}=xu(),{suggestSimilar:x0}=E0(),Iu=class t extends Bk{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=>ce.stdout.write(r),writeErr:r=>ce.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>ce.stdout.isTTY?ce.stdout.columns:void 0,getErrHelpWidth:()=>ce.stderr.isTTY?ce.stderr.columns:void 0,getOutHasColors:()=>Ou()??(ce.stdout.isTTY&&ce.stdout.hasColors?.()),getErrHasColors:()=>Ou()??(ce.stderr.isTTY&&ce.stderr.hasColors?.()),stripColor:r=>Rk(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 Pk,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
|
|
84
|
+
- 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 Lk(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}'.
|
|
85
|
+
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 ku(e,r,n)),ce.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 C0(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}'
|
|
86
|
+
- 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 C0)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,u)=>{let f=a.exec(l);return f?f[0]:u},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){ce.versions?.electron&&(r.from="electron");let i=ce.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=ce.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":ce.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.
|
|
87
|
+
- 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(Zo.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
|
|
88
|
+
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
89
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
90
|
+
- ${i}`;throw new Error(s)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(f,c){let d=ir.resolve(f,c);if(Zo.existsSync(d))return d;if(i.includes(ir.extname(c)))return;let p=i.find(m=>Zo.existsSync(`${d}${m}`));if(p)return`${d}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let f;try{f=Zo.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=ir.resolve(ir.dirname(f),a)}if(a){let f=s(a,o);if(!f&&!e._executableFile&&this._scriptPath){let c=ir.basename(this._scriptPath,ir.extname(this._scriptPath));c!==this._name&&(f=s(a,`${c}-${e._name}`))}o=f||o}n=i.includes(ir.extname(o));let l;ce.platform!=="win32"?n?(r.unshift(o),r=S0(ce.execArgv).concat(r),l=Su.spawn(ce.argv[0],r,{stdio:"inherit"})):l=Su.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=S0(ce.execArgv).concat(r),l=Su.spawn(ce.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{ce.on(c,()=>{l.killed===!1&&l.exitCode===null&&l.kill(c)})});let u=this._exitCallback;l.on("close",f=>{f=f??1,u?u(new ku(f,"commander.executeSubCommandAsync","(close)")):ce.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(!u)ce.exit(1);else{let c=new ku(1,"commander.executeSubCommandAsync","(error)");c.nestedError=f,u(c)}}),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 u=this._findOption(l);if(u){if(u.required){let f=s.shift();f===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,f)}else if(u.optional){let f=null;s.length>0&&!o(s[0])&&(f=s.shift()),this.emit(`option:${u.name()}`,f)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let u=this._findOption(`-${l[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,l.slice(2)):(this.emit(`option:${u.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let u=l.indexOf("="),f=this._findOption(l.slice(0,u));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,l.slice(u+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}
|
|
91
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
92
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
93
|
+
`),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 ce.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()}`,ce.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Nk(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),u=this.options.find(c=>c.negate&&a===c.attributeName()),f=this.options.find(c=>!c.negate&&a===c.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u: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=x0(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=x0(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}
|
|
94
|
+
`),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=>Dk(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=ir.basename(e,ir.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(ce.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.
|
|
95
|
+
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}
|
|
96
|
+
`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function S0(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 Ou(){if(ce.env.NO_COLOR||ce.env.FORCE_COLOR==="0"||ce.env.FORCE_COLOR==="false")return!1;if(ce.env.FORCE_COLOR||ce.env.CLICOLOR_FORCE!==void 0)return!0}Bu.Command=Iu;Bu.useColor=Ou});var L0=R(kt=>{var{Argument:I0}=Xo(),{Command:Lu}=k0(),{CommanderError:Tk,InvalidArgumentError:O0}=Ji(),{Help:Fk}=_u(),{Option:B0}=xu();kt.program=new Lu;kt.createCommand=t=>new Lu(t);kt.createOption=(t,e)=>new B0(t,e);kt.createArgument=(t,e)=>new I0(t,e);kt.Command=Lu;kt.Option=B0;kt.Argument=I0;kt.Help=Fk;kt.CommanderError=Tk;kt.InvalidArgumentError=O0;kt.InvalidOptionArgumentError=O0});var Mu,H0,Vk,$0=Pe(()=>{Mu=(t,e,r)=>{let n=t instanceof RegExp?H0(t,r):t,i=e instanceof RegExp?H0(e,r):e,s=n!==null&&i!=null&&Vk(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)}},H0=(t,e)=>{let r=e.match(t);return r?r[0]:null},Vk=(t,e,r)=>{let n,i,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(t===e)return[l,u];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 c=n.pop();c!==void 0&&(a=[c,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=r.indexOf(e,f+1);f=l<u&&l>=0?l:u}n.length&&o!==void 0&&(a=[s,o])}return a}});function ju(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function aI(t){return t.replace(tI,W0).replace(rI,K0).replace(nI,Uu).replace(iI,G0).replace(sI,J0)}function lI(t){return t.replace(Yk,"\\").replace(zk,"{").replace(Xk,"}").replace(Zk,",").replace(eI,".")}function V0(t){if(!t)return[""];let e=[],r=Mu("{","}",t);if(!r)return t.split(",");let{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";let a=V0(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Y0(t,e={}){if(!t)return[];let{max:r=oI}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Vi(aI(t),r,!0).map(lI)}function cI(t){return"{"+t+"}"}function uI(t){return/^-?0\d/.test(t)}function fI(t,e){return t<=e}function hI(t,e){return t>=e}function Vi(t,e,r){let n=[],i=Mu("{","}",t);if(!i)return[t];let s=i.pre,o=i.post.length?Vi(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<o.length&&a<e;a++){let l=s+"{"+i.body+"}"+o[a];n.push(l)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),u=a||l,f=i.body.indexOf(",")>=0;if(!u&&!f)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+Uu+i.post,Vi(t,e,!0)):[t];let c;if(u)c=i.body.split(/\.\./);else if(c=V0(i.body),c.length===1&&c[0]!==void 0&&(c=Vi(c[0],e,!1).map(cI),c.length===1))return o.map(p=>i.pre+c[0]+p);let d;if(u&&c[0]!==void 0&&c[1]!==void 0){let p=ju(c[0]),m=ju(c[1]),g=Math.max(c[0].length,c[1].length),A=c.length===3&&c[2]!==void 0?Math.max(Math.abs(ju(c[2])),1):1,y=fI;m<p&&(A*=-1,y=hI);let b=c.some(uI);d=[];for(let E=p;y(E,m)&&d.length<e;E+=A){let v;if(l)v=String.fromCharCode(E),v==="\\"&&(v="");else if(v=String(E),b){let C=g-v.length;if(C>0){let O=new Array(C+1).join("0");E<0?v="-"+O+v.slice(1):v=O+v}}d.push(v)}}else{d=[];for(let p=0;p<c.length;p++)d.push.apply(d,Vi(c[p],e,!1))}for(let p=0;p<d.length;p++)for(let m=0;m<o.length&&n.length<e;m++){let g=s+d[p]+o[m];(!r||u||g)&&n.push(g)}}return n}var W0,K0,Uu,G0,J0,Yk,zk,Xk,Zk,eI,tI,rI,nI,iI,sI,oI,z0=Pe(()=>{$0();W0="\0SLASH"+Math.random()+"\0",K0="\0OPEN"+Math.random()+"\0",Uu="\0CLOSE"+Math.random()+"\0",G0="\0COMMA"+Math.random()+"\0",J0="\0PERIOD"+Math.random()+"\0",Yk=new RegExp(W0,"g"),zk=new RegExp(K0,"g"),Xk=new RegExp(Uu,"g"),Zk=new RegExp(G0,"g"),eI=new RegExp(J0,"g"),tI=/\\\\/g,rI=/\\{/g,nI=/\\}/g,iI=/\\,/g,sI=/\\\./g,oI=1e5});var Yi,X0=Pe(()=>{Yi=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}});var dI,zi,pI,Z0,eA,tA=Pe(()=>{dI={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},zi=t=>t.replace(/[[\]\\-]/g,"\\$&"),pI=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Z0=t=>t.join(""),eA=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,o=!1,a=!1,l=!1,u=!1,f=r,c="";e:for(;s<t.length;){let g=t.charAt(s);if((g==="!"||g==="^")&&s===r+1){u=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[A,[y,_,b]]of Object.entries(dI))if(t.startsWith(A,s)){if(c)return["$.",!1,t.length-r,!0];s+=A.length,b?i.push(y):n.push(y),a=a||_;continue e}}if(l=!1,c){g>c?n.push(zi(c)+"-"+zi(g)):g===c&&n.push(zi(g)),c="",s++;continue}if(t.startsWith("-]",s+1)){n.push(zi(g+"-")),s+=2;continue}if(t.startsWith("-",s+1)){c=g,s+=2;continue}n.push(zi(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let g=n[0].length===2?n[0].slice(-1):n[0];return[pI(g),!1,f-r,!1]}let d="["+(u?"^":"")+Z0(n)+"]",p="["+(u?"":"^")+Z0(i)+"]";return[n.length&&i.length?"("+d+"|"+p+")":n.length?d:p,a,f-r,!0]}});var It,sa=Pe(()=>{It=(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")});var ut,mI,qu,rA,gI,AI,yI,nA,wI,oa,bI,_I,vI,EI,Hu,iA,sA,CI,rn,$u=Pe(()=>{tA();sa();mI=new Set(["!","?","+","*","@"]),qu=t=>mI.has(t),rA=t=>qu(t.type),gI=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),AI=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),yI=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),nA=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),wI="(?!(?:^|/)\\.\\.?(?:$|/))",oa="(?!\\.)",bI=new Set(["[","."]),_I=new Set(["..","."]),vI=new Set("().*{}+?[]^$\\!"),EI=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Hu="[^/]",iA=Hu+"*?",sA=Hu+"+?",CI=0,rn=class{type;#e;#n;#i=!1;#t=[];#o;#E;#y;#f=!1;#a;#h;#u=!1;id=++CI;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,r,n={}){this.type=e,e&&(this.#n=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#f&&this.#y.push(this),this.#E=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#h=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let r=e,n=r.#o;for(;n;){for(let i=r.#E+1;!n.type&&i<n.#t.length;i++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof ut&&r.#o===this))throw new Error("invalid part: "+r);this.#t.push(r)}}toJSON(){let e=this.type===null?this.#t.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#t.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#E===0)return!0;let e=this.#o;for(let r=0;r<this.#E;r++){let n=e.#t[r];if(!(n instanceof ut&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#E===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new ut(this.type,e);for(let n of this.#t)r.copyIn(n);return r}static#s(e,r,n,i,s){let o=i.maxExtglobRecursion??2,a=!1,l=!1,u=-1,f=!1;if(r.type===null){let g=n,A="";for(;g<e.length;){let y=e.charAt(g++);if(a||y==="\\"){a=!a,A+=y;continue}if(l){g===u+1?(y==="^"||y==="!")&&(f=!0):y==="]"&&!(g===u+2&&f)&&(l=!1),A+=y;continue}else if(y==="["){l=!0,u=g,f=!1,A+=y;continue}if(!i.noext&&qu(y)&&e.charAt(g)==="("&&s<=o){r.push(A),A="";let b=new ut(y,r);g=ut.#s(e,b,g,i,s+1),r.push(b);continue}A+=y}return r.push(A),g}let c=n+1,d=new ut(null,r),p=[],m="";for(;c<e.length;){let g=e.charAt(c++);if(a||g==="\\"){a=!a,m+=g;continue}if(l){c===u+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(c===u+2&&f)&&(l=!1),m+=g;continue}else if(g==="["){l=!0,u=c,f=!1,m+=g;continue}if(!i.noext&&qu(g)&&e.charAt(c)==="("&&(s<=o||r&&r.#p(g))){let y=r&&r.#p(g)?0:1;d.push(m),m="";let _=new ut(g,d);d.push(_),c=ut.#s(e,_,c,i,s+y);continue}if(g==="|"){d.push(m),m="",p.push(d),d=new ut(null,r);continue}if(g===")")return m===""&&r.#t.length===0&&(r.#u=!0),d.push(m),m="",r.push(...p,d),c;m+=g}return r.type=null,r.#n=void 0,r.#t=[e.substring(n-1)],c}#w(e){return this.#_(e,AI)}#_(e,r=gI){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,r)}#p(e,r=yI){return!!r.get(this.type)?.includes(e)}#m(e,r){let n=e.#t[0],i=new ut(null,n,this.options);i.#t.push(""),n.push(i),this.#S(e,r)}#S(e,r){let n=e.#t[0];this.#t.splice(r,1,...n.#t);for(let i of n.#t)typeof i=="object"&&(i.#o=this);this.#h=void 0}#g(e){return!!nA.get(this.type)?.has(e)}#v(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let r=e.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#g(r.type)}#C(e){let r=nA.get(this.type),n=e.#t[0],i=r?.get(n.type);if(!i)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=i,this.#h=void 0,this.#u=!1}static fromGlob(e,r={}){let n=new ut(null,void 0,r);return ut.#s(e,n,0,r,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#a}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&(this.#d(),this.#c()),!rA(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(p=>typeof p!="string"),u=this.#t.map(p=>{let[m,g,A,y]=typeof p=="string"?ut.#b(p,this.#n,l):p.toRegExpSource(e);return this.#n=this.#n||A,this.#i=this.#i||y,m}).join(""),f="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&_I.has(this.#t[0]))){let m=bI,g=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),A=!r&&!e&&m.has(u.charAt(0));f=g?wI:A?oa:""}let c="";return this.isEnd()&&this.#e.#f&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[f+u+c,It(u),this.#n=!!this.#n,this.#i]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#A(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),u=this;return u.#t=[l],u.type=null,u.#n=void 0,[l,It(this.toString()),!1,!1]}let o=!n||e||r||!oa?"":this.#A(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!r?oa:"")+sA;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?oa:"")+iA+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+l}return[a,It(s),this.#n=!!this.#n,this.#i]}#d(){if(rA(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#t.length;n++){let i=this.#t[n];typeof i=="object"&&(i.#d(),this.#_(i)?(r=!1,this.#S(i,n)):this.#w(i)?(r=!1,this.#m(i,n)):this.#v(i)&&(r=!1,this.#C(i)))}}while(!r&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#d();this.#h=void 0}#A(e){return this.#t.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=r.toRegExpSource(e);return this.#i=this.#i||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(e,r,n=!1){let i=!1,s="",o=!1,a=!1;for(let l=0;l<e.length;l++){let u=e.charAt(l);if(i){i=!1,s+=(vI.has(u)?"\\":"")+u;continue}if(u==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?sA:iA,r=!0;continue}else a=!1;if(u==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[f,c,d,p]=eA(e,l);if(d){s+=f,o=o||c,l+=d-1,r=r||p;continue}}if(u==="?"){s+=Hu,r=!0;continue}s+=EI(u)}return[s,It(e),!!r,o]}};ut=rn});var nn,Wu=Pe(()=>{nn=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")});var Ze,xI,SI,kI,II,OI,BI,LI,DI,PI,RI,NI,TI,FI,QI,MI,jI,UI,qI,lA,cA,uA,oA,HI,Se,$I,WI,KI,GI,JI,Ot,VI,fA,YI,zI,aA,XI,gt,Sr=Pe(()=>{z0();X0();$u();Wu();sa();$u();Wu();sa();Ze=(t,e,r={})=>(Yi(e),!r.nocomment&&e.charAt(0)==="#"?!1:new gt(e,r).match(t)),xI=/^\*+([^+@!?*[(]*)$/,SI=t=>e=>!e.startsWith(".")&&e.endsWith(t),kI=t=>e=>e.endsWith(t),II=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),OI=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),BI=/^\*+\.\*+$/,LI=t=>!t.startsWith(".")&&t.includes("."),DI=t=>t!=="."&&t!==".."&&t.includes("."),PI=/^\.\*+$/,RI=t=>t!=="."&&t!==".."&&t.startsWith("."),NI=/^\*+$/,TI=t=>t.length!==0&&!t.startsWith("."),FI=t=>t.length!==0&&t!=="."&&t!=="..",QI=/^\?+([^+@!?*[(]*)?$/,MI=([t,e=""])=>{let r=lA([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},jI=([t,e=""])=>{let r=cA([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},UI=([t,e=""])=>{let r=cA([t]);return e?n=>r(n)&&n.endsWith(e):r},qI=([t,e=""])=>{let r=lA([t]);return e?n=>r(n)&&n.endsWith(e):r},lA=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},cA=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},uA=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",oA={win32:{sep:"\\"},posix:{sep:"/"}},HI=uA==="win32"?oA.win32.sep:oA.posix.sep;Ze.sep=HI;Se=Symbol("globstar **");Ze.GLOBSTAR=Se;$I="[^/]",WI=$I+"*?",KI="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",GI="(?:(?!(?:\\/|^)\\.).)*?",JI=(t,e={})=>r=>Ze(r,t,e);Ze.filter=JI;Ot=(t,e={})=>Object.assign({},t,e),VI=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ze;let e=Ze;return Object.assign((n,i,s={})=>e(n,i,Ot(t,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,Ot(t,s))}static defaults(i){return e.defaults(Ot(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,Ot(t,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,Ot(t,s))}},unescape:(n,i={})=>e.unescape(n,Ot(t,i)),escape:(n,i={})=>e.escape(n,Ot(t,i)),filter:(n,i={})=>e.filter(n,Ot(t,i)),defaults:n=>e.defaults(Ot(t,n)),makeRe:(n,i={})=>e.makeRe(n,Ot(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,Ot(t,i)),match:(n,i,s={})=>e.match(n,i,Ot(t,s)),sep:e.sep,GLOBSTAR:Se})};Ze.defaults=VI;fA=(t,e={})=>(Yi(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Y0(t,{max:e.braceExpandMax}));Ze.braceExpand=fA;YI=(t,e={})=>new gt(t,e).makeRe();Ze.makeRe=YI;zI=(t,e,r={})=>{let n=new gt(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};Ze.match=zI;aA=/[?*]|[+@!]\(.*?\)|\[|\]/,XI=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){Yi(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||uA,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!aA.test(s[2]))&&!aA.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(u)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1],l=n[i+2],u=n[i+3];if(a!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let i=0,s=0,o=[],a="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])o.push(a==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])o.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])o.push(r[s]),s++;else if(e[i]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[i]),i++,s++}else if(r[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",o.push(r[s]),i++,s++}else return!1;return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let i=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),f=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),c=l?3:a?0:void 0,d=f?3:u?0:void 0;if(typeof c=="number"&&typeof d=="number"){let[p,m]=[e[c],r[d]];p.toLowerCase()===m.toLowerCase()&&(r[d]=p,s=d,i=c)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(Se)?this.#e(e,r,n,i,s):this.#i(e,r,n,i,s)}#e(e,r,n,i,s){let o=r.indexOf(Se,s),a=r.lastIndexOf(Se),[l,u,f]=n?[r.slice(s,o),r.slice(o+1),[]]:[r.slice(s,o),r.slice(o+1,a),r.slice(a+1)];if(l.length){let _=e.slice(i,i+l.length);if(!this.#i(_,l,n,0,0))return!1;i+=l.length,s+=l.length}let c=0;if(f.length){if(f.length+i>e.length)return!1;let _=e.length-f.length;if(this.#i(e,f,n,_,0))c=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(_--,!this.#i(e,f,n,_,0)))return!1;c=f.length+1}}if(!u.length){let _=!!c;for(let b=i;b<e.length-c;b++){let E=String(e[b]);if(_=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return n||_}let d=[[[],0]],p=d[0],m=0,g=[0];for(let _ of u)_===Se?(g.push(m),p=[[],0],d.push(p)):(p[0].push(_),m++);let A=d.length-1,y=e.length-c;for(let _ of d)_[1]=y-(g[A--]+_[0].length);return!!this.#n(e,d,i,0,n,0,!!c)}#n(e,r,n,i,s,o,a){let l=r[i];if(!l){for(let c=n;c<e.length;c++){a=!0;let d=e[c];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return a}let[u,f]=l;for(;n<=f;){if(this.#i(e.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let p=this.#n(e,r,n+u.length,i+1,s,o+1,a);if(p!==!1)return p}let d=e[n];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;n++}return s||null}#i(e,r,n,i,s){let o,a,l,u;for(o=i,a=s,u=e.length,l=r.length;o<u&&a<l;o++,a++){this.debug("matchOne loop");let f=r[a],c=e[o];if(this.debug(r,f,c),f===!1||f===Se)return!1;let d;if(typeof f=="string"?(d=c===f,this.debug("string match",f,c,d)):(d=f.test(c),this.debug("pattern match",f,c,d)),!d)return!1}if(o===u&&a===l)return!0;if(o===u)return n;if(a===l)return o===u-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return fA(this.pattern,this.options)}parse(e){Yi(e);let r=this.options;if(e==="**")return Se;if(e==="")return"";let n,i=null;(n=e.match(NI))?i=r.dot?FI:TI:(n=e.match(xI))?i=(r.nocase?r.dot?OI:II:r.dot?kI:SI)(n[1]):(n=e.match(QI))?i=(r.nocase?r.dot?jI:MI:r.dot?UI:qI)(n):(n=e.match(BI))?i=r.dot?DI:LI:(n=e.match(PI))&&(i=RI);let s=rn.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?WI:r.dot?KI:GI,i=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?XI(c):c===Se?Se:c._src});u.forEach((c,d)=>{let p=u[d+1],m=u[d-1];c!==Se||m===Se||(m===void 0?p!==void 0&&p!==Se?u[d+1]="(?:\\/|"+n+"\\/)?"+p:u[d]=n:p===void 0?u[d-1]=m+"(?:\\/|\\/"+n+")?":p!==Se&&(u[d-1]=m+"(?:\\/|\\/"+n+"\\/)"+p,u[d+1]=Se))});let f=u.filter(c=>c!==Se);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let l=i;if(n.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Ze.defaults(e).Minimatch}};Ze.AST=rn;Ze.Minimatch=gt;Ze.escape=nn;Ze.unescape=It});import{tracingChannel as ZI,channel as eO}from"node:diagnostics_channel";var Ue,Xi,tO,Ku,dA,hA,rO,nO,kr,pA,aa,iO,es,gA=Pe(()=>{Ue=eO("lru-cache:metrics"),Xi=ZI("lru-cache"),tO=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ku=()=>Ue.hasSubscribers||Xi.hasSubscribers,dA=new Set,hA=typeof process=="object"&&process?process:{},rO=(t,e,r,n)=>{typeof hA.emitWarning=="function"?hA.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},nO=t=>!dA.has(t),kr=t=>!!t&&t===Math.floor(t)&&t>0&&isFinite(t),pA=t=>kr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?aa:null:null,aa=class extends Array{constructor(t){super(t),this.fill(0)}},iO=class Zi{heap;length;static#e=!1;static create(e){let r=pA(e);if(!r)return[];Zi.#e=!0;let n=new Zi(e,r);return Zi.#e=!1,n}constructor(e,r){if(!Zi.#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]}},es=class mA{#e;#n;#i;#t;#o;#E;#y;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#h;#u;#c;#s;#w;#_;#p;#m;#S;#g;#v;#C;#d;#A;#b;#I;#r;#L;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#d,autopurgeTimers:e.#A,sizes:e.#v,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#w,prev:e.#_,get head(){return e.#p},get tail(){return e.#m},free:e.#S,isBackgroundFetch:r=>e.#l(r),backgroundFetch:(r,n,i,s)=>e.#F(r,n,i,s),moveToTail:r=>e.#J(r),indexes:r=>e.#O(r),rindexes:r=>e.#B(r),isStale:r=>e.#x(r)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#h}get size(){return this.#a}get fetchMethod(){return this.#E}get memoMethod(){return this.#y}get dispose(){return this.#i}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:A,fetchMethod:y,memoMethod:_,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:C,ignoreFetchAbort:O,backgroundFetchSize:M=1,perf:q}=e;if(this.backgroundFetchSize=M,q!==void 0&&typeof q?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=q??tO,r!==0&&!kr(r))throw new TypeError("max option must be a nonnegative integer");let F=r?pA(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#e=r,this.#n=m,this.maxEntrySize=g||this.#n,this.sizeCalculation=A,this.sizeCalculation){if(!this.#n&&!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(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=_,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#E=y,this.#I=!!y,this.#u=new Map,this.#c=Array.from({length:r}).fill(void 0),this.#s=Array.from({length:r}).fill(void 0),this.#w=new F(r),this.#_=new F(r),this.#p=0,this.#m=0,this.#S=iO.create(r),this.#a=0,this.#h=0,typeof u=="function"&&(this.#i=u),typeof f=="function"&&(this.#t=f),typeof c=="function"?(this.#o=c,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#b=!!this.#i,this.#L=!!this.#t,this.#r=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!v,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!O,this.maxEntrySize!==0){if(this.#n!==0&&!kr(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!kr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=kr(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!kr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(this.#e===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){let B="LRU_CACHE_UNBOUNDED";nO(B)&&(dA.add(B),rO("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",B,mA))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#D(){let e=new aa(this.#e),r=new aa(this.#e);this.#d=e,this.#C=r;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#A=n,this.#M=(a,l,u=this.#f.now())=>{r[a]=l!==0?u:0,e[a]=l,i(a,l)},this.#k=a=>{r[a]=e[a]!==0?this.#f.now():0,i(a,e[a])};let i=this.ttlAutopurge?(a,l)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),l&&l!==0&&n){let u=setTimeout(()=>{this.#x(a)&&this.#Q(this.#c[a],"expire")},l+1);u.unref&&u.unref(),n[a]=u}}:()=>{};this.#P=(a,l)=>{if(e[l]){let u=e[l],f=r[l];if(!u||!f)return;a.ttl=u,a.start=f,a.now=s||o();let c=a.now-f;a.remainingTTL=u-c}};let s=0,o=()=>{let a=this.#f.now();if(this.ttlResolution>0){s=a;let l=setTimeout(()=>s=0,this.ttlResolution);l.unref&&l.unref()}return a};this.getRemainingTTL=a=>{let l=this.#u.get(a);if(l===void 0)return 0;let u=e[l],f=r[l];if(!u||!f)return 1/0;let c=(s||o())-f;return u-c},this.#x=a=>{let l=r[a],u=e[a];return!!u&&!!l&&(s||o())-l>u}}#k=()=>{};#P=()=>{};#M=()=>{};#x=()=>!1;#$(){let e=new aa(this.#e);this.#h=0,this.#v=e,this.#N=r=>{this.#h-=e[r],e[r]=0},this.#j=(r,n,i,s)=>{if(!kr(i)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,r),!kr(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.#R=(r,n,i)=>{if(e[r]=n,this.#n){let s=this.#n-e[r];for(;this.#h>s;)this.#H(!0)}this.#h+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#h)}}#N=e=>{};#R=(e,r,n)=>{};#j=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#m;this.#U(r)&&((e||!this.#x(r))&&(yield r),r!==this.#p);)r=this.#_[r]}*#B({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#p;this.#U(r)&&((e||!this.#x(r))&&(yield r),r!==this.#m);)r=this.#w[r]}#U(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#O())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#B())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#O()){let r=this.#c[e];r!==void 0&&!this.#l(this.#s[e])&&(yield r)}}*rkeys(){for(let e of this.#B()){let r=this.#c[e];r!==void 0&&!this.#l(this.#s[e])&&(yield r)}}*values(){for(let e of this.#O())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#B())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#O()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#c[n],this))return this.#G(this.#c[n],r)}}forEach(e,r=this){for(let n of this.#O()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#c[n],this)}}rforEach(e,r=this){for(let n of this.#B()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let r of this.#B({allowStale:!0}))this.#x(r)&&(this.#Q(this.#c[r],"expire"),e=!0);return e}info(e){let r=this.#u.get(e);if(r===void 0)return;let n=this.#s[r],i=this.#l(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#d&&this.#C){let o=this.#d[r],a=this.#C[r];if(o&&a){let l=o-(this.#f.now()-a);s.ttl=l,s.start=Date.now()}}return this.#v&&(s.size=this.#v[r]),s}dump(){let e=[];for(let r of this.#O({allowStale:!0})){let n=this.#c[r],i=this.#s[r],s=this.#l(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#d&&this.#C){o.ttl=this.#d[r];let a=this.#f.now()-this.#C[r];o.start=Math.floor(Date.now()-a)}this.#v&&(o.size=this.#v[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.#f.now()-i}this.#T(r,n.value,n)}}set(e,r,n={}){let{status:i=Ue.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.#T(e,r,n);return i&&Ue.hasSubscribers&&Ue.publish(i),s}#T(e,r,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,f=this.#l(r);if(r===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:c=this.noUpdateTTL}=n;u&&!f&&(u.value=r);let d=this.#j(e,r,n.size||0,l,u);if(this.maxEntrySize&&d>this.maxEntrySize)return this.#Q(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let p=this.#a===0?void 0:this.#u.get(e);if(p===void 0)p=this.#a===0?this.#m:this.#S.length!==0?this.#S.pop():this.#a===this.#e?this.#H(!1):this.#a,this.#c[p]=e,this.#s[p]=r,this.#u.set(e,p),this.#w[this.#m]=p,this.#_[p]=this.#m,this.#m=p,this.#a++,this.#R(p,d,u),u&&(u.set="add"),c=!1,this.#L&&!f&&this.#t?.(r,e,"add");else{this.#J(p);let m=this.#s[p];if(r!==m){if(!a)if(this.#l(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=m;g!==void 0&&g!==r&&(this.#b&&this.#i?.(g,e,"set"),this.#r&&this.#g?.push([g,e,"set"]))}else this.#b&&this.#i?.(m,e,"set"),this.#r&&this.#g?.push([m,e,"set"]);if(this.#N(p),this.#R(p,d,u),this.#s[p]=r,!f){let g=m&&this.#l(m)?m.__staleWhileFetching:m,A=g===void 0?"add":r!==g?"replace":"update";u&&(u.set=A,g!==void 0&&(u.oldValue=g)),this.#L&&this.onInsert?.(r,e,A)}}else f||(u&&(u.set="update"),this.#L&&this.onInsert?.(r,e,"update"))}if(s!==0&&!this.#d&&this.#D(),this.#d&&(c||this.#M(p,s,o),u&&this.#P(u,p)),!a&&this.#r&&this.#g){let m=this.#g,g;for(;g=m?.shift();)this.#o?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#p];if(this.#H(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#r&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#o?.(...r)}}}#H(e){let r=this.#p,n=this.#c[r],i=this.#s[r],s=this.#l(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#b||this.#r)&&o!==void 0&&(this.#b&&this.#i?.(o,n,"evict"),this.#r&&this.#g?.push([o,n,"evict"])),this.#N(r),this.#A?.[r]&&(clearTimeout(this.#A[r]),this.#A[r]=void 0),e&&(this.#c[r]=void 0,this.#s[r]=void 0,this.#S.push(r)),this.#a===1?(this.#p=this.#m=0,this.#S.length=0):this.#p=this.#w[r],this.#u.delete(n),this.#a--,r}has(e,r={}){let{status:n=Ue.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#V(e,r);return Ue.hasSubscribers&&Ue.publish(n),i}#V(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#x(s))i&&(i.has="stale",this.#P(i,s));else return n&&this.#k(s),i&&(i.has="hit",this.#P(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{status:n=Ku()?{}:void 0}=r;n&&(n.op="peek",n.key=e,n.cache=this),r.status=n;let i=this.#W(e,r);return Ue.hasSubscribers&&Ue.publish(n),i}#W(e,r){let{status:n,allowStale:i=this.allowStale}=r,s=this.#u.get(e);if(s===void 0||!i&&this.#x(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,r,n,i){let s=r===void 0?void 0:this.#s[r];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},u=(g,A=!1)=>{let{aborted:y}=o.signal,_=n.ignoreFetchAbort&&g!==void 0,b=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(y&&!A?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,_&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!_&&!A)return c(o.signal.reason,b);let E=p,v=this.#s[r];return(v===p||v===void 0&&_&&A)&&(g===void 0?E.__staleWhileFetching!==void 0?this.#s[r]=E.__staleWhileFetching:this.#Q(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#T(e,g,l.options,E))),g},f=g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),c(g,!1)),c=(g,A)=>{let{aborted:y}=o.signal,_=y&&n.allowStaleOnFetchAbort,b=_||n.allowStaleOnFetchRejection,E=b||n.noDeleteOnFetchRejection,v=p;if(this.#s[r]===p&&(!E||!A&&v.__staleWhileFetching===void 0?this.#Q(e,"fetch"):_||(this.#s[r]=v.__staleWhileFetching)),b)return n.status&&v.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),v.__staleWhileFetching;if(v.__returned===v)throw g},d=(g,A)=>{let y=this.#E?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=_=>u(_,!0)))}),y&&y instanceof Promise?y.then(_=>g(_===void 0?void 0:_),A):y!==void 0&&g(y)};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(d).then(u,f),m=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.#T(e,m,{...l.options,status:void 0}),r=this.#u.get(e)):this.#s[r]=m,m}#l(e){if(!this.#I)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController}fetch(e,r={}){let n=Xi.hasSubscribers,{status:i=Ku()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#K(e,r);return i&&n&&(i.trace=!0,Xi.tracePromise(()=>s,i).catch(()=>{})),s}async#K(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:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:g,forceRefresh:A=!1,status:y,signal:_}=r;if(y&&(y.op="fetch",y.key=e,A&&(y.forceRefresh=!0),y.cache=this),!this.#I)return y&&(y.fetch="get"),this.#G(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:y});let b={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:y,signal:_},E=this.#u.get(e);if(E===void 0){y&&(y.fetch="miss");let v=this.#F(e,E,b,g);return v.__returned=v}else{let v=this.#s[E];if(this.#l(v)){let q=n&&v.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",q&&(y.returnedStale=!0)),q?v.__staleWhileFetching:v.__returned=v}let C=this.#x(E);if(!A&&!C)return y&&(y.fetch="hit"),this.#J(E),i&&this.#k(E),y&&this.#P(y,E),v;let O=this.#F(e,E,b,g),M=O.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=C?"stale":"refresh",M&&C&&(y.returnedStale=!0)),M?O.__staleWhileFetching:O.__returned=O}}forceFetch(e,r={}){let n=Xi.hasSubscribers,{status:i=Ku()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#q(e,r);return i&&n&&(i.trace=!0,Xi.tracePromise(()=>s,i).catch(()=>{})),s}async#q(e,r={}){let n=await this.#K(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let{status:n=Ue.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.#X(e,r);return n&&(n.value=i),Ue.hasSubscribers&&Ue.publish(n),i}#X(e,r={}){let n=this.#y;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),u=o||l===void 0;if(s&&(s.memo=u?"miss":"hit",u||(s.value=l)),!u)return l;let f=n(e,l,{options:a,context:i});return s&&(s.value=f),this.#T(e,f,a),f}get(e,r={}){let{status:n=Ue.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),Ue.hasSubscribers&&Ue.publish(n)),i}#G(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#s[a],u=this.#l(l);return o&&this.#P(o,a),this.#x(a)?u?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#Q(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=u?"fetching":"hit"),this.#J(a),i&&this.#k(a),u?l.__staleWhileFetching:l)}#Y(e,r){this.#_[r]=e,this.#w[e]=r}#J(e){e!==this.#m&&(e===this.#p?this.#p=this.#w[e]:this.#Y(this.#_[e],this.#w[e]),this.#Y(this.#m,e),this.#m=e)}delete(e){return this.#Q(e,"delete")}#Q(e,r){Ue.hasSubscribers&&Ue.publish({op:"delete",delete:r,key:e,cache:this});let n=!1;if(this.#a!==0){let i=this.#u.get(e);if(i!==void 0)if(this.#A?.[i]&&(clearTimeout(this.#A?.[i]),this.#A[i]=void 0),n=!0,this.#a===1)this.#z(r);else{this.#N(i);let s=this.#s[i];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#r)&&(this.#b&&this.#i?.(s,e,r),this.#r&&this.#g?.push([s,e,r])),this.#u.delete(e),this.#c[i]=void 0,this.#s[i]=void 0,i===this.#m)this.#m=this.#_[i];else if(i===this.#p)this.#p=this.#w[i];else{let o=this.#_[i];this.#w[o]=this.#w[i];let a=this.#w[i];this.#_[a]=this.#_[i]}this.#a--,this.#S.push(i)}}if(this.#r&&this.#g?.length){let i=this.#g,s;for(;s=i?.shift();)this.#o?.(...s)}return n}clear(){return this.#z("delete")}#z(e){for(let r of this.#B({allowStale:!0})){let n=this.#s[r];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#c[r];this.#b&&this.#i?.(n,i,e),this.#r&&this.#g?.push([n,i,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#d&&this.#C){this.#d.fill(0),this.#C.fill(0);for(let r of this.#A??[])r!==void 0&&clearTimeout(r);this.#A?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#p=0,this.#m=0,this.#S.length=0,this.#h=0,this.#a=0,this.#r&&this.#g){let r=this.#g,n;for(;n=r?.shift();)this.#o?.(...n)}}}});import{EventEmitter as Zu}from"node:events";import _A from"node:stream";import{StringDecoder as sO}from"node:string_decoder";var AA,oO,aO,lO,sr,or,Ir,la,ts,ca,yA,ua,wA,Qt,Jn,Fe,rs,Vn,Qe,et,Me,Gu,fa,$e,ke,Ju,Vu,bA,Yu,$t,zu,ha,ns,sn,At,is,cO,uO,fO,hO,da,Xu,dO,pO,Or,ef=Pe(()=>{AA=typeof process=="object"&&process?process:{stdout:null,stderr:null},oO=t=>!!t&&typeof t=="object"&&(t instanceof Or||t instanceof _A||aO(t)||lO(t)),aO=t=>!!t&&typeof t=="object"&&t instanceof Zu&&typeof t.pipe=="function"&&t.pipe!==_A.Writable.prototype.pipe,lO=t=>!!t&&typeof t=="object"&&t instanceof Zu&&typeof t.write=="function"&&typeof t.end=="function",sr=Symbol("EOF"),or=Symbol("maybeEmitEnd"),Ir=Symbol("emittedEnd"),la=Symbol("emittingEnd"),ts=Symbol("emittedError"),ca=Symbol("closed"),yA=Symbol("read"),ua=Symbol("flush"),wA=Symbol("flushChunk"),Qt=Symbol("encoding"),Jn=Symbol("decoder"),Fe=Symbol("flowing"),rs=Symbol("paused"),Vn=Symbol("resume"),Qe=Symbol("buffer"),et=Symbol("pipes"),Me=Symbol("bufferLength"),Gu=Symbol("bufferPush"),fa=Symbol("bufferShift"),$e=Symbol("objectMode"),ke=Symbol("destroyed"),Ju=Symbol("error"),Vu=Symbol("emitData"),bA=Symbol("emitEnd"),Yu=Symbol("emitEnd2"),$t=Symbol("async"),zu=Symbol("abort"),ha=Symbol("aborted"),ns=Symbol("signal"),sn=Symbol("dataListeners"),At=Symbol("discarded"),is=t=>Promise.resolve().then(t),cO=t=>t(),uO=t=>t==="end"||t==="finish"||t==="prefinish",fO=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,hO=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),da=class{src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[Vn](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Xu=class extends da{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=i=>this.dest.emit("error",i),e.on("error",this.proxyErrors)}},dO=t=>!!t.objectMode,pO=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Or=class extends Zu{[Fe]=!1;[rs]=!1;[et]=[];[Qe]=[];[$e];[Qt];[$t];[Jn];[sr]=!1;[Ir]=!1;[la]=!1;[ca]=!1;[ts]=null;[Me]=0;[ke]=!1;[ns];[ha]=!1;[sn]=0;[At]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");dO(r)?(this[$e]=!0,this[Qt]=null):pO(r)?(this[Qt]=r.encoding,this[$e]=!1):(this[$e]=!1,this[Qt]=null),this[$t]=!!r.async,this[Jn]=this[Qt]?new sO(this[Qt]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Qe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[et]});let{signal:n}=r;n&&(this[ns]=n,n.aborted?this[zu]():n.addEventListener("abort",()=>this[zu]()))}get bufferLength(){return this[Me]}get encoding(){return this[Qt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[$e]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[$t]}set async(e){this[$t]=this[$t]||!!e}[zu](){this[ha]=!0,this.emit("abort",this[ns]?.reason),this.destroy(this[ns]?.reason)}get aborted(){return this[ha]}set aborted(e){}write(e,r,n){if(this[ha])return!1;if(this[sr])throw new Error("write after end");if(this[ke])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[$t]?is:cO;if(!this[$e]&&!Buffer.isBuffer(e)){if(hO(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(fO(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[$e]?(this[Fe]&&this[Me]!==0&&this[ua](!0),this[Fe]?this.emit("data",e):this[Gu](e),this[Me]!==0&&this.emit("readable"),n&&i(n),this[Fe]):e.length?(typeof e=="string"&&!(r===this[Qt]&&!this[Jn]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Qt]&&(e=this[Jn].write(e)),this[Fe]&&this[Me]!==0&&this[ua](!0),this[Fe]?this.emit("data",e):this[Gu](e),this[Me]!==0&&this.emit("readable"),n&&i(n),this[Fe]):(this[Me]!==0&&this.emit("readable"),n&&i(n),this[Fe])}read(e){if(this[ke])return null;if(this[At]=!1,this[Me]===0||e===0||e&&e>this[Me])return this[or](),null;this[$e]&&(e=null),this[Qe].length>1&&!this[$e]&&(this[Qe]=[this[Qt]?this[Qe].join(""):Buffer.concat(this[Qe],this[Me])]);let r=this[yA](e||null,this[Qe][0]);return this[or](),r}[yA](e,r){if(this[$e])this[fa]();else{let n=r;e===n.length||e===null?this[fa]():typeof n=="string"?(this[Qe][0]=n.slice(e),r=n.slice(0,e),this[Me]-=e):(this[Qe][0]=n.subarray(e),r=n.subarray(0,e),this[Me]-=e)}return this.emit("data",r),!this[Qe].length&&!this[sr]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[sr]=!0,this.writable=!1,(this[Fe]||!this[rs])&&this[or](),this}[Vn](){this[ke]||(!this[sn]&&!this[et].length&&(this[At]=!0),this[rs]=!1,this[Fe]=!0,this.emit("resume"),this[Qe].length?this[ua]():this[sr]?this[or]():this.emit("drain"))}resume(){return this[Vn]()}pause(){this[Fe]=!1,this[rs]=!0,this[At]=!1}get destroyed(){return this[ke]}get flowing(){return this[Fe]}get paused(){return this[rs]}[Gu](e){this[$e]?this[Me]+=1:this[Me]+=e.length,this[Qe].push(e)}[fa](){return this[$e]?this[Me]-=1:this[Me]-=this[Qe][0].length,this[Qe].shift()}[ua](e=!1){do;while(this[wA](this[fa]())&&this[Qe].length);!e&&!this[Qe].length&&!this[sr]&&this.emit("drain")}[wA](e){return this.emit("data",e),this[Fe]}pipe(e,r){if(this[ke])return e;this[At]=!1;let n=this[Ir];return r=r||{},e===AA.stdout||e===AA.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[et].push(r.proxyErrors?new Xu(this,e,r):new da(this,e,r)),this[$t]?is(()=>this[Vn]()):this[Vn]()),e}unpipe(e){let r=this[et].find(n=>n.dest===e);r&&(this[et].length===1?(this[Fe]&&this[sn]===0&&(this[Fe]=!1),this[et]=[]):this[et].splice(this[et].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[At]=!1,this[sn]++,!this[et].length&&!this[Fe]&&this[Vn]();else if(e==="readable"&&this[Me]!==0)super.emit("readable");else if(uO(e)&&this[Ir])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ts]){let i=r;this[$t]?is(()=>i.call(this,this[ts])):i.call(this,this[ts])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[sn]=this.listeners("data").length,this[sn]===0&&!this[At]&&!this[et].length&&(this[Fe]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[sn]=0,!this[At]&&!this[et].length&&(this[Fe]=!1)),r}get emittedEnd(){return this[Ir]}[or](){!this[la]&&!this[Ir]&&!this[ke]&&this[Qe].length===0&&this[sr]&&(this[la]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ca]&&this.emit("close"),this[la]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==ke&&this[ke])return!1;if(e==="data")return!this[$e]&&!n?!1:this[$t]?(is(()=>this[Vu](n)),!0):this[Vu](n);if(e==="end")return this[bA]();if(e==="close"){if(this[ca]=!0,!this[Ir]&&!this[ke])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[ts]=n,super.emit(Ju,n);let s=!this[ns]||this.listeners("error").length?super.emit("error",n):!1;return this[or](),s}else if(e==="resume"){let s=super.emit("resume");return this[or](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...r);return this[or](),i}[Vu](e){for(let n of this[et])n.dest.write(e)===!1&&this.pause();let r=this[At]?!1:super.emit("data",e);return this[or](),r}[bA](){return this[Ir]?!1:(this[Ir]=!0,this.readable=!1,this[$t]?(is(()=>this[Yu]()),!0):this[Yu]())}[Yu](){if(this[Jn]){let r=this[Jn].end();if(r){for(let n of this[et])n.dest.write(r);this[At]||super.emit("data",r)}}for(let r of this[et])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[$e]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[$e]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[$e])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Qt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ke,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[At]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[sr])return r();let s,o,a=c=>{this.off("data",l),this.off("end",u),this.off(ke,f),r(),o(c)},l=c=>{this.off("error",a),this.off("end",u),this.off(ke,f),this.pause(),s({value:c,done:!!this[sr]})},u=()=>{this.off("error",a),this.off("data",l),this.off(ke,f),r(),s({done:!0,value:void 0})},f=()=>a(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,s=c,this.once(ke,f),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[At]=!1;let e=!1,r=()=>(this.pause(),this.off(Ju,r),this.off(ke,r),this.off("end",r),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return r();let i=this.read();return i===null?r():{done:!1,value:i}};return this.once("end",r),this.once(Ju,r),this.once(ke,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[ke])return e?this.emit("error",e):this.emit(ke),this;this[ke]=!0,this[At]=!0,this[Qe].length=0,this[Me]=0;let r=this;return typeof r.close=="function"&&!this[ca]&&r.close(),e?this.emit("error",e):this.emit(ke),this}static get isStream(){return oO}}});import{posix as mO,win32 as nf}from"node:path";import{fileURLToPath as gO}from"node:url";import{lstatSync as AO,readdir as yO,readdirSync as wO,readlinkSync as bO,realpathSync as _O}from"fs";import*as vO from"node:fs";import{lstat as CO,readdir as xO,readlink as SO,realpath as kO}from"node:fs/promises";var EO,os,SA,kA,IO,OO,Lt,IA,OA,Wt,BA,LA,on,DA,Bt,ss,tf,vA,as,Mt,pa,ga,EA,BO,rf,CA,ls,xA,ma,Aa,sf,PA,We,ya,wa,ba,Yn,zn,cs,LF,RA,NA=Pe(()=>{gA();ef();EO=_O.native,os={lstatSync:AO,readdir:yO,readdirSync:wO,readlinkSync:bO,realpathSync:EO,promises:{lstat:CO,readdir:xO,readlink:SO,realpath:kO}},SA=t=>!t||t===os||t===vO?os:{...os,...t,promises:{...os.promises,...t.promises||{}}},kA=/^\\\\\?\\([a-z]:)\\?$/i,IO=t=>t.replace(/\//g,"\\").replace(kA,"$1\\"),OO=/[\\\/]/,Lt=0,IA=1,OA=2,Wt=4,BA=6,LA=8,on=10,DA=12,Bt=15,ss=~Bt,tf=16,vA=32,as=64,Mt=128,pa=256,ga=512,EA=as|Mt|ga,BO=1023,rf=t=>t.isFile()?LA:t.isDirectory()?Wt:t.isSymbolicLink()?on:t.isCharacterDevice()?OA:t.isBlockDevice()?BA:t.isSocket()?DA:t.isFIFO()?IA:Lt,CA=new es({max:2**12}),ls=t=>{let e=CA.get(t);if(e)return e;let r=t.normalize("NFKD");return CA.set(t,r),r},xA=new es({max:2**12}),ma=t=>{let e=xA.get(t);if(e)return e;let r=ls(t.toLowerCase());return xA.set(t,r),r},Aa=class extends es{constructor(){super({max:256})}},sf=class extends es{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},PA=Symbol("PathScurry setAsCwd"),We=class{name;root;roots;parent;nocase;isCWD=!1;#e;#n;get dev(){return this.#n}#i;get mode(){return this.#i}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#E;get gid(){return this.#E}#y;get rdev(){return this.#y}#f;get blksize(){return this.#f}#a;get ino(){return this.#a}#h;get size(){return this.#h}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#w;get ctimeMs(){return this.#w}#_;get birthtimeMs(){return this.#_}#p;get atime(){return this.#p}#m;get mtime(){return this.#m}#S;get ctime(){return this.#S}#g;get birthtime(){return this.#g}#v;#C;#d;#A;#b;#I;#r;#L;#D;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=Lt,n,i,s,o,a){this.name=e,this.#v=s?ma(e):ls(e),this.#r=r&BO,this.nocase=s,this.roots=i,this.root=n||this,this.#L=o,this.#d=a.fullpath,this.#b=a.relative,this.#I=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=SA(a.fs)}depth(){return this.#C!==void 0?this.#C:this.parent?this.#C=this.parent.depth()+1:this.#C=0}childrenCache(){return this.#L}resolve(e){if(!e)return this;let r=this.getRootString(e),i=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#P(i):this.#P(i)}#P(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#L.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#L.set(this,r),this.#r&=~tf,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?ma(e):ls(e);for(let l of n)if(l.#v===i)return l;let s=this.parent?this.sep:"",o=this.#d?this.#d+s+e:void 0,a=this.newChild(e,Lt,{...r,parent:this,fullpath:o});return this.canReaddir()||(a.#r|=Mt),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#b!==void 0)return this.#b;let e=this.name,r=this.parent;if(!r)return this.#b=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let e=this.name,r=this.parent;if(!r)return this.#I=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#d!==void 0)return this.#d;let e=this.name,r=this.parent;if(!r)return this.#d=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+e;return this.#d=i}fullpathPosix(){if(this.#A!==void 0)return this.#A;if(this.sep==="/")return this.#A=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#A=`//?/${i}`:this.#A=i}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#A=n}isUnknown(){return(this.#r&Bt)===Lt}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Bt)===LA}isDirectory(){return(this.#r&Bt)===Wt}isCharacterDevice(){return(this.#r&Bt)===OA}isBlockDevice(){return(this.#r&Bt)===BA}isFIFO(){return(this.#r&Bt)===IA}isSocket(){return(this.#r&Bt)===DA}isSymbolicLink(){return(this.#r&on)===on}lstatCached(){return this.#r&vA?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#r&Bt;return!(e!==Lt&&e!==on||this.#r&pa||this.#r&Mt)}calledReaddir(){return!!(this.#r&tf)}isENOENT(){return!!(this.#r&Mt)}isNamed(e){return this.nocase?this.#v===ma(e):this.#v===ls(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(r);if(n)return this.#D=n}catch(r){this.#B(r.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(r);if(n)return this.#D=n}catch(r){this.#B(r.code);return}}#M(e){this.#r|=tf;for(let r=e.provisional;r<e.length;r++){let n=e[r];n&&n.#x()}}#x(){this.#r&Mt||(this.#r=(this.#r|Mt)&ss,this.#$())}#$(){let e=this.children();e.provisional=0;for(let r of e)r.#x()}#N(){this.#r|=ga,this.#R()}#R(){if(this.#r&as)return;let e=this.#r;(e&Bt)===Wt&&(e&=ss),this.#r=e|as,this.#$()}#j(e=""){e==="ENOTDIR"||e==="EPERM"?this.#R():e==="ENOENT"?this.#x():this.children().provisional=0}#O(e=""){e==="ENOTDIR"?this.parent.#R():e==="ENOENT"&&this.#x()}#B(e=""){let r=this.#r;r|=pa,e==="ENOENT"&&(r|=Mt),(e==="EINVAL"||e==="UNKNOWN")&&(r&=ss),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#R()}#U(e,r){return this.#H(e,r)||this.#T(e,r)}#T(e,r){let n=rf(e),i=this.newChild(e.name,n,{parent:this}),s=i.#r&Bt;return s!==Wt&&s!==on&&s!==Lt&&(i.#r|=as),r.unshift(i),r.provisional++,i}#H(e,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?ma(e.name):ls(e.name))===i.#v)return this.#V(e,i,n,r)}}#V(e,r,n,i){let s=r.name;return r.#r=r.#r&ss|rf(e),s!==e.name&&(r.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if((this.#r&Mt)===0)try{return this.#W(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#O(e.code)}}lstatSync(){if((this.#r&Mt)===0)try{return this.#W(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#O(e.code)}}#W(e){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:u,dev:f,gid:c,ino:d,mode:p,mtime:m,mtimeMs:g,nlink:A,rdev:y,size:_,uid:b}=e;this.#p=r,this.#c=n,this.#g=i,this.#_=s,this.#f=o,this.#u=a,this.#S=l,this.#w=u,this.#n=f,this.#E=c,this.#a=d,this.#i=p,this.#m=m,this.#s=g,this.#t=A,this.#y=y,this.#h=_,this.#o=b;let E=rf(e);this.#r=this.#r&ss|E|vA,E!==Lt&&E!==Wt&&E!==on&&(this.#r|=as)}#F=[];#l=!1;#K(e){this.#l=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(n=>n(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#F.push(e),this.#l)return;this.#l=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#j(s.code),n.provisional=0;else{for(let a of o)this.#U(a,n);this.#M(n)}this.#K(n.slice(0,n.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#q)await this.#q;else{let n=()=>{};this.#q=new Promise(i=>n=i);try{for(let i of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#U(i,e);this.#M(e)}catch(i){this.#j(i.code),e.provisional=0}this.#q=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#U(n,e);this.#M(e)}catch(n){this.#j(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&EA)return!1;let e=Bt&this.#r;return e===Lt||e===Wt||e===on}shouldWalk(e,r){return(this.#r&Wt)===Wt&&!(this.#r&EA)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((ga|pa|Mt)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#k)return this.#k;if(!((ga|pa|Mt)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#N()}}[PA](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#b=n.join(this.sep),i.#I=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!r.has(i);)i.#b=void 0,i.#I=void 0,i=i.parent}},ya=class t extends We{sep="\\";splitSep=OO;constructor(e,r=Lt,n,i,s,o,a){super(e,r,n,i,s,o,a)}newChild(e,r=Lt,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return nf.parse(e).root}getRoot(e){if(e=IO(e.toUpperCase()),e===this.root.name)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 Yn(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(kA,"$1\\"),e===r}},wa=class t extends We{splitSep="/";sep="/";constructor(e,r=Lt,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=Lt,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},ba=class{root;rootPath;roots;cwd;#e;#n;#i;nocase;#t;constructor(e=process.cwd(),r,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=os}={}){this.#t=SA(o),(e instanceof URL||e.startsWith("file://"))&&(e=gO(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new Aa,this.#n=new Aa,this.#i=new sf(s);let l=a.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let u=this.root,f=l.length-1,c=r.sep,d=this.rootPath,p=!1;for(let m of l){let g=f--;u=u.child(m,{relative:new Array(g).fill("..").join(c),relativePosix:new Array(g).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#i}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let n=this.#e.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#e.set(r,i),i}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let n=this.#n.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#n.set(r,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set,u=(c,d)=>{l.add(c),c.readdirCB((p,m)=>{if(p)return d(p);let g=m.length;if(!g)return d();let A=()=>{--g===0&&d()};for(let y of m)(!s||s(y))&&a.push(n?y:y.fullpath()),i&&y.isSymbolicLink()?y.realpath().then(_=>_?.isUnknown()?_.lstat():_).then(_=>_?.shouldWalk(l,o)?u(_,A):A()):y.shouldWalk(l,o)?u(y,A):A()},!0)},f=e;return new Promise((c,d)=>{u(f,p=>{if(p)return d(p);c(a)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set([e]);for(let u of l){let f=u.readdirSync();for(let c of f){(!s||s(c))&&a.push(n?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,o)&&l.add(d)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let f of u){(!s||s(f))&&(yield n?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(a,o)&&a.add(c)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=new Or({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let l=new Set,u=[e],f=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){f===0&&a.end();return}f++,l.add(p);let m=(A,y,_=!1)=>{if(A)return a.emit("error",A);if(i&&!_){let b=[];for(let E of y)E.isSymbolicLink()&&b.push(E.realpath().then(v=>v?.isUnknown()?v.lstat():v));if(b.length){Promise.all(b).then(()=>m(null,y,!0));return}}for(let b of y)b&&(!s||s(b))&&(a.write(n?b:b.fullpath())||(d=!0));f--;for(let b of y){let E=b.realpathCached()||b;E.shouldWalk(l,o)&&u.push(E)}d&&!a.flowing?a.once("drain",c):g||c()},g=!0;p.readdirCB(m,!0),g=!1}};return c(),a}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof We||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=new Or({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let u=[e],f=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){f===0&&a.end();return}f++,l.add(p);let m=p.readdirSync();for(let g of m)(!s||s(g))&&(a.write(n?g:g.fullpath())||(d=!0));f--;for(let g of m){let A=g;if(g.isSymbolicLink()){if(!(i&&(A=g.realpathSync())))continue;A.isUnknown()&&A.lstatSync()}A.shouldWalk(l,o)&&u.push(A)}}d&&!a.flowing&&a.once("drain",c)};return c(),a}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[PA](r)}},Yn=class extends ba{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,nf,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return nf.parse(e).root.toUpperCase()}newRoot(e){return new ya(this.rootPath,Wt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},zn=class extends ba{sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,mO,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new wa(this.rootPath,Wt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},cs=class extends zn{constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}},LF=process.platform==="win32"?ya:wa,RA=process.platform==="win32"?Yn:process.platform==="darwin"?cs:zn});var LO,DO,Xn,of=Pe(()=>{Sr();LO=t=>t.length>=1,DO=t=>t.length>=1,Xn=class t{#e;#n;#i;length;#t;#o;#E;#y;#f;#a;#h=!0;constructor(e,r,n,i){if(!LO(e))throw new TypeError("empty pattern list");if(!DO(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.#n=r,this.#i=n,this.#t=i,this.#i===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[f,c,d,p,...m]=this.#n;u[0]===""&&(u.shift(),m.shift());let g=[s,o,a,l,""].join("/"),A=[f,c,d,p,""].join("/");this.#e=[g,...u],this.#n=[A,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#n;o[0]===""&&(o.shift(),l.shift());let u=s+"/",f=a+"/";this.#e=[u,...o],this.#n=[f,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#i]}isString(){return typeof this.#e[this.#i]=="string"}isGlobstar(){return this.#e[this.#i]===Se}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#E=this.#E||(this.#i===0?this.isAbsolute()?this.#n[0]+this.#n.slice(1).join("/"):this.#n.join("/"):this.#n.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#n,this.#i+1,this.#t),this.#o.#a=this.#a,this.#o.#f=this.#f,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#t==="win32"&&this.#i===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#i===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.#i===0?e:""}checkFollowGlobstar(){return!(this.#i===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#i===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}}});var PO,an,af=Pe(()=>{Sr();of();PO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",an=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:i,noglobstar:s,platform:o=PO}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let r=new gt(e,this.mmopts);for(let n=0;n<r.set.length;n++){let i=r.set[n],s=r.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Xn(i,s,0,this.platform),a=new gt(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let r=e.fullpath(),n=`${r}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(r)||o.match(n))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}}});var lf,cf,uf,us,TA=Pe(()=>{Sr();lf=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}},cf=class{store=new Map;add(e,r,n){let i=(r?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},uf=class{store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},us=class t{hasWalkedCache;matches=new cf;subwalks=new uf;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new lf}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 c=s.rest();if(c)s=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,f=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,f=!0;if(l=s.pattern(),u=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let c=l===".."||l===""||l===".";this.matches.add(i.resolve(l),a,c);continue}else if(l===Se){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let c=u?.pattern(),d=u?.rest();if(!u||(c===""||c===".")&&!d)this.matches.add(i,a,c===""||c===".");else if(c===".."){let p=i.parent||i;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,a,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(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(),u=o.rest();l===Se?i.testGlobstar(s,o,u,a):l instanceof RegExp?i.testRegExp(s,l,u,a):i.testString(s,l,u,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 s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,r,n,i){r.test(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))}}});var RO,_a,fs,hs,FA=Pe(()=>{ef();af();TA();RO=(t,e)=>typeof t=="string"?new an([t],e):Array.isArray(t)?new an(t,e):t,_a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#n;#i;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#i=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#n=RO(n.ignore??[],n),!this.includeChildMatches&&typeof this.#n.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#n?.ignored?.(e)}#o(e){return!!this.#n?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#t(e))return;if(!this.includeChildMatches&&this.#n?.add){let s=`${e.relativePosix()}/**`;this.#n.add(s)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,r,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,r)}matchSync(e,r,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,r)}walkCB(e,r,n){this.signal?.aborted&&n(),this.walkCB2(e,r,new us(this.opts),n)}walkCB2(e,r,n,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,i));return}n.processPatterns(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,u]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,u).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,n,o):a.readdirCB((u,f)=>this.walkCB3(a,f,n,o),!0)}o()}walkCB3(e,r,n,i){n=n.filterEntries(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,u]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,u).then(()=>o()));for(let[a,l]of n.subwalks.entries())s++,this.walkCB2(a,l,n.child(),o);o()}walkCBSync(e,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,r,new us(this.opts),n)}walkCB2Sync(e,r,n,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,i));return}n.processPatterns(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,u]of n.matches.entries())this.#t(a)||this.matchSync(a,l,u);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,n,o)}o()}walkCB3Sync(e,r,n,i){n=n.filterEntries(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,u]of n.matches.entries())this.#t(a)||this.matchSync(a,l,u);for(let[a,l]of n.subwalks.entries())s++,this.walkCB2Sync(a,l,n.child(),o);o()}},fs=class extends _a{matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},hs=class extends _a{results;constructor(e,r,n){super(e,r,n),this.results=new Or({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as NO}from"node:url";var TO,Dt,ff=Pe(()=>{Sr();NA();of();FA();TO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Dt=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=NO(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||TO,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?Yn:r.platform==="darwin"?cs:r.platform?zn:RA;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new gt(l,i)),[o,a]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let f=a[u];if(!f)throw new Error("invalid pattern object");return new Xn(l,f,0,this.platform)})}async walk(){return[...await new fs(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 fs(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 hs(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 hs(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var va,hf=Pe(()=>{Sr();va=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new gt(r,e).hasMagic())return!0;return!1}});var $A={};Wh($A,{Glob:()=>Dt,Ignore:()=>an,escape:()=>nn,glob:()=>ar,globIterate:()=>mf,globIterateSync:()=>ps,globStream:()=>df,globStreamSync:()=>ds,globSync:()=>pf,hasMagic:()=>va,iterate:()=>qA,iterateSync:()=>UA,stream:()=>jA,streamSync:()=>MA,sync:()=>HA,unescape:()=>It});function ds(t,e={}){return new Dt(t,e).streamSync()}function df(t,e={}){return new Dt(t,e).stream()}function pf(t,e={}){return new Dt(t,e).walkSync()}async function QA(t,e={}){return new Dt(t,e).walk()}function ps(t,e={}){return new Dt(t,e).iterateSync()}function mf(t,e={}){return new Dt(t,e).iterate()}var MA,jA,UA,qA,HA,ar,ms=Pe(()=>{Sr();ff();hf();Sr();ff();hf();af();MA=ds,jA=Object.assign(df,{sync:ds}),UA=ps,qA=Object.assign(mf,{sync:ps}),HA=Object.assign(pf,{stream:ds,iterate:ps}),ar=Object.assign(QA,{glob:QA,globSync:pf,sync:HA,globStream:df,stream:jA,globStreamSync:ds,streamSync:MA,globIterate:mf,iterate:qA,globIterateSync:ps,iterateSync:UA,Glob:Dt,hasMagic:va,escape:nn,unescape:It});ar.glob=ar});var ys=R((b6,GA)=>{var UO=Object.prototype.toString;GA.exports=function(e){if(e===void 0)return"undefined";if(e===null)return"null";var r=typeof e;if(r==="boolean")return"boolean";if(r==="string")return"string";if(r==="number")return"number";if(r==="symbol")return"symbol";if(r==="function")return KO(e)?"generatorfunction":"function";if(qO(e))return"array";if(VO(e))return"buffer";if(JO(e))return"arguments";if($O(e))return"date";if(HO(e))return"error";if(WO(e))return"regexp";switch(KA(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(GO(e))return"generator";switch(r=UO.call(e),r){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")};function KA(t){return typeof t.constructor=="function"?t.constructor.name:null}function qO(t){return Array.isArray?Array.isArray(t):t instanceof Array}function HO(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function $O(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function WO(t){return t instanceof RegExp?!0:typeof t.flags=="string"&&typeof t.ignoreCase=="boolean"&&typeof t.multiline=="boolean"&&typeof t.global=="boolean"}function KO(t,e){return KA(t)==="GeneratorFunction"}function GO(t){return typeof t.throw=="function"&&typeof t.return=="function"&&typeof t.next=="function"}function JO(t){try{if(typeof t.length=="number"&&typeof t.callee=="function")return!0}catch(e){if(e.message.indexOf("callee")!==-1)return!0}return!1}function VO(t){return t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}});var VA=R((_6,JA)=>{"use strict";JA.exports=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")}});var XA=R((v6,zA)=>{"use strict";var YA=VA();zA.exports=function(e){YA(e)||(e={});for(var r=arguments.length,n=1;n<r;n++){var i=arguments[n];YA(i)&&YO(e,i)}return e};function YO(t,e){for(var r in e)zO(e,r)&&(t[r]=e[r])}function zO(t,e){return Object.prototype.hasOwnProperty.call(t,e)}});var ty=R((E6,ey)=>{"use strict";var XO=ys(),ZO=XA();ey.exports=function(t,e){typeof e=="function"&&(e={parse:e});var r=tB(t),n={section_delimiter:"---",parse:nB},i=ZO({},n,e),s=i.section_delimiter,o=r.content.split(/\r?\n/),a=null,l=ZA(),u=[],f=[];function c(y){r.content=y,a=[],u=[]}function d(y){f.length&&(l.key=rB(f[0],s),l.content=y,i.parse(l,a),a.push(l),l=ZA(),u=[],f=[])}for(var p=0;p<o.length;p++){var m=o[p],g=f.length,A=m.trim();if(eB(A,s)){if(A.length===3&&p!==0){if(g===0||g===2){u.push(m);continue}f.push(A),l.data=u.join(`
|
|
97
|
+
`),u=[];continue}a===null&&c(u.join(`
|
|
98
|
+
`)),g===2&&d(u.join(`
|
|
99
|
+
`)),f.push(A);continue}u.push(m)}return a===null?c(u.join(`
|
|
100
|
+
`)):d(u.join(`
|
|
101
|
+
`)),r.sections=a,r};function eB(t,e){return!(t.slice(0,e.length)!==e||t.charAt(e.length+1)===e.slice(-1))}function tB(t){if(XO(t)!=="object"&&(t={content:t}),typeof t.content!="string"&&!iB(t.content))throw new TypeError("expected a buffer or string");return t.content=t.content.toString(),t.sections=[],t}function rB(t,e){return t?t.slice(e.length).trim():""}function ZA(){return{key:"",data:"",content:""}}function nB(t){return t}function iB(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}});var cn=R((C6,ln)=>{"use strict";function ry(t){return typeof t>"u"||t===null}function sB(t){return typeof t=="object"&&t!==null}function oB(t){return Array.isArray(t)?t:ry(t)?[]:[t]}function aB(t,e){var r,n,i,s;if(e)for(s=Object.keys(e),r=0,n=s.length;r<n;r+=1)i=s[r],t[i]=e[i];return t}function lB(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function cB(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}ln.exports.isNothing=ry;ln.exports.isObject=sB;ln.exports.toArray=oB;ln.exports.repeat=lB;ln.exports.isNegativeZero=cB;ln.exports.extend=aB});var Zn=R((x6,ny)=>{"use strict";function ws(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ws.prototype=Object.create(Error.prototype);ws.prototype.constructor=ws;ws.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};ny.exports=ws});var oy=R((S6,sy)=>{"use strict";var iy=cn();function Af(t,e,r,n,i){this.name=t,this.buffer=e,this.position=r,this.line=n,this.column=i}Af.prototype.getSnippet=function(e,r){var n,i,s,o,a;if(!this.buffer)return null;for(e=e||4,r=r||75,n="",i=this.position;i>0&&`\0\r
|
|
102
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>r/2-1){n=" ... ",i+=5;break}for(s="",o=this.position;o<this.buffer.length&&`\0\r
|
|
103
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>r/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),iy.repeat(" ",e)+n+a+s+`
|
|
104
|
+
`+iy.repeat(" ",e+this.position-i+n.length)+"^"};Af.prototype.toString=function(e){var r,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(n+=`:
|
|
105
|
+
`+r)),n};sy.exports=Af});var Ne=R((k6,ly)=>{"use strict";var ay=Zn(),uB=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],fB=["scalar","sequence","mapping"];function hB(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function dB(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(uB.indexOf(r)===-1)throw new ay('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=hB(e.styleAliases||null),fB.indexOf(this.kind)===-1)throw new ay('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}ly.exports=dB});var un=R((I6,uy)=>{"use strict";var cy=cn(),Ca=Zn(),pB=Ne();function yf(t,e,r){var n=[];return t.include.forEach(function(i){r=yf(i,e,r)}),t[e].forEach(function(i){r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&n.push(o)}),r.push(i)}),r.filter(function(i,s){return n.indexOf(s)===-1})}function mB(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function n(i){t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function ei(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new Ca("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=yf(this,"implicit",[]),this.compiledExplicit=yf(this,"explicit",[]),this.compiledTypeMap=mB(this.compiledImplicit,this.compiledExplicit)}ei.DEFAULT=null;ei.create=function(){var e,r;switch(arguments.length){case 1:e=ei.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new Ca("Wrong number of arguments for Schema.create function")}if(e=cy.toArray(e),r=cy.toArray(r),!e.every(function(n){return n instanceof ei}))throw new Ca("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(n){return n instanceof pB}))throw new Ca("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ei({include:e,explicit:r})};uy.exports=ei});var hy=R((O6,fy)=>{"use strict";var gB=Ne();fy.exports=new gB("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var py=R((B6,dy)=>{"use strict";var AB=Ne();dy.exports=new AB("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var gy=R((L6,my)=>{"use strict";var yB=Ne();my.exports=new yB("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var xa=R((D6,Ay)=>{"use strict";var wB=un();Ay.exports=new wB({explicit:[hy(),py(),gy()]})});var wy=R((P6,yy)=>{"use strict";var bB=Ne();function _B(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function vB(){return null}function EB(t){return t===null}yy.exports=new bB("tag:yaml.org,2002:null",{kind:"scalar",resolve:_B,construct:vB,predicate:EB,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var _y=R((R6,by)=>{"use strict";var CB=Ne();function xB(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function SB(t){return t==="true"||t==="True"||t==="TRUE"}function kB(t){return Object.prototype.toString.call(t)==="[object Boolean]"}by.exports=new CB("tag:yaml.org,2002:bool",{kind:"scalar",resolve:xB,construct:SB,predicate:kB,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var Ey=R((N6,vy)=>{"use strict";var IB=cn(),OB=Ne();function BB(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function LB(t){return 48<=t&&t<=55}function DB(t){return 48<=t&&t<=57}function PB(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!BB(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}for(;r<e;r++)if(i=t[r],i!=="_"){if(!LB(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(i===":")break;if(!DB(t.charCodeAt(r)))return!1;n=!0}return!n||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function RB(t){var e=t,r=1,n,i,s=[];return e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0"?0:n==="0"?e[1]==="b"?r*parseInt(e.slice(2),2):e[1]==="x"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(":")!==-1?(e.split(":").forEach(function(o){s.unshift(parseInt(o,10))}),e=0,i=1,s.forEach(function(o){e+=o*i,i*=60}),r*e):r*parseInt(e,10)}function NB(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!IB.isNegativeZero(t)}vy.exports=new OB("tag:yaml.org,2002:int",{kind:"scalar",resolve:PB,construct:RB,predicate:NB,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Sy=R((T6,xy)=>{"use strict";var Cy=cn(),TB=Ne(),FB=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function QB(t){return!(t===null||!FB.test(t)||t[t.length-1]==="_")}function MB(t){var e,r,n,i;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){i.unshift(parseFloat(s,10))}),e=0,n=1,i.forEach(function(s){e+=s*n,n*=60}),r*e):r*parseFloat(e,10)}var jB=/^[-+]?[0-9]+e/;function UB(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Cy.isNegativeZero(t))return"-0.0";return r=t.toString(10),jB.test(r)?r.replace("e",".e"):r}function qB(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Cy.isNegativeZero(t))}xy.exports=new TB("tag:yaml.org,2002:float",{kind:"scalar",resolve:QB,construct:MB,predicate:qB,represent:UB,defaultStyle:"lowercase"})});var wf=R((F6,ky)=>{"use strict";var HB=un();ky.exports=new HB({include:[xa()],implicit:[wy(),_y(),Ey(),Sy()]})});var bf=R((Q6,Iy)=>{"use strict";var $B=un();Iy.exports=new $B({include:[wf()]})});var Dy=R((M6,Ly)=>{"use strict";var WB=Ne(),Oy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),By=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 KB(t){return t===null?!1:Oy.exec(t)!==null||By.exec(t)!==null}function GB(t){var e,r,n,i,s,o,a,l=0,u=null,f,c,d;if(e=Oy.exec(t),e===null&&(e=By.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(f=+e[10],c=+(e[11]||0),u=(f*60+c)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,s,o,a,l)),u&&d.setTime(d.getTime()-u),d}function JB(t){return t.toISOString()}Ly.exports=new WB("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:KB,construct:GB,instanceOf:Date,represent:JB})});var Ry=R((j6,Py)=>{"use strict";var VB=Ne();function YB(t){return t==="<<"||t===null}Py.exports=new VB("tag:yaml.org,2002:merge",{kind:"scalar",resolve:YB})});var Fy=R((U6,Ty)=>{"use strict";var fn;try{Ny=le,fn=Ny("buffer").Buffer}catch{}var Ny,zB=Ne(),_f=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
106
|
+
\r`;function XB(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=_f;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function ZB(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=_f,o=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),fn?fn.from?fn.from(a):new fn(a):a}function e3(t){var e="",r=0,n,i,s=t.length,o=_f;for(n=0;n<s;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function t3(t){return fn&&fn.isBuffer(t)}Ty.exports=new zB("tag:yaml.org,2002:binary",{kind:"scalar",resolve:XB,construct:ZB,predicate:t3,represent:e3})});var My=R((H6,Qy)=>{"use strict";var r3=Ne(),n3=Object.prototype.hasOwnProperty,i3=Object.prototype.toString;function s3(t){if(t===null)return!0;var e=[],r,n,i,s,o,a=t;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],o=!1,i3.call(i)!=="[object Object]")return!1;for(s in i)if(n3.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function o3(t){return t!==null?t:[]}Qy.exports=new r3("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s3,construct:o3})});var Uy=R(($6,jy)=>{"use strict";var a3=Ne(),l3=Object.prototype.toString;function c3(t){if(t===null)return!0;var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],l3.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function u3(t){if(t===null)return[];var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}jy.exports=new a3("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:c3,construct:u3})});var Hy=R((W6,qy)=>{"use strict";var f3=Ne(),h3=Object.prototype.hasOwnProperty;function d3(t){if(t===null)return!0;var e,r=t;for(e in r)if(h3.call(r,e)&&r[e]!==null)return!1;return!0}function p3(t){return t!==null?t:{}}qy.exports=new f3("tag:yaml.org,2002:set",{kind:"mapping",resolve:d3,construct:p3})});var ti=R((K6,$y)=>{"use strict";var m3=un();$y.exports=new m3({include:[bf()],implicit:[Dy(),Ry()],explicit:[Fy(),My(),Uy(),Hy()]})});var Ky=R((G6,Wy)=>{"use strict";var g3=Ne();function A3(){return!0}function y3(){}function w3(){return""}function b3(t){return typeof t>"u"}Wy.exports=new g3("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:A3,construct:y3,predicate:b3,represent:w3})});var Jy=R((J6,Gy)=>{"use strict";var _3=Ne();function v3(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),n="";return!(e[0]==="/"&&(r&&(n=r[1]),n.length>3||e[e.length-n.length-1]!=="/"))}function E3(t){var e=t,r=/\/([gim]*)$/.exec(t),n="";return e[0]==="/"&&(r&&(n=r[1]),e=e.slice(1,e.length-n.length-1)),new RegExp(e,n)}function C3(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function x3(t){return Object.prototype.toString.call(t)==="[object RegExp]"}Gy.exports=new _3("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:v3,construct:E3,predicate:x3,represent:C3})});var zy=R((V6,Yy)=>{"use strict";var Sa;try{Vy=le,Sa=Vy("esprima")}catch{typeof window<"u"&&(Sa=window.esprima)}var Vy,S3=Ne();function k3(t){if(t===null)return!1;try{var e="("+t+")",r=Sa.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function I3(t){var e="("+t+")",r=Sa.parse(e,{range:!0}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(s){n.push(s.name)}),i=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(n,e.slice(i[0]+1,i[1]-1)):new Function(n,"return "+e.slice(i[0],i[1]))}function O3(t){return t.toString()}function B3(t){return Object.prototype.toString.call(t)==="[object Function]"}Yy.exports=new S3("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:k3,construct:I3,predicate:B3,represent:O3})});var bs=R((z6,Zy)=>{"use strict";var Xy=un();Zy.exports=Xy.DEFAULT=new Xy({include:[ti()],explicit:[Ky(),Jy(),zy()]})});var ww=R((X6,_s)=>{"use strict";var lr=cn(),ow=Zn(),L3=oy(),aw=ti(),D3=bs(),Lr=Object.prototype.hasOwnProperty,ka=1,lw=2,cw=3,Ia=4,vf=1,P3=2,ew=3,R3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,N3=/[\x85\u2028\u2029]/,T3=/[,\[\]\{\}]/,uw=/^(?:!|!!|![a-z\-]+!)$/i,fw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function tw(t){return Object.prototype.toString.call(t)}function Kt(t){return t===10||t===13}function dn(t){return t===9||t===32}function ft(t){return t===9||t===32||t===10||t===13}function ri(t){return t===44||t===91||t===93||t===123||t===125}function F3(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Q3(t){return t===120?2:t===117?4:t===85?8:0}function M3(t){return 48<=t&&t<=57?t-48:-1}function rw(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
107
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function j3(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function hw(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var dw=new Array(256),pw=new Array(256);for(hn=0;hn<256;hn++)dw[hn]=rw(hn)?1:0,pw[hn]=rw(hn);var hn;function U3(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||D3,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function mw(t,e){return new ow(e,new L3(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function ee(t,e){throw mw(t,e)}function Oa(t,e){t.onWarning&&t.onWarning.call(null,mw(t,e))}var nw={YAML:function(e,r,n){var i,s,o;e.version!==null&&ee(e,"duplication of %YAML directive"),n.length!==1&&ee(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&ee(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&ee(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Oa(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&ee(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],uw.test(i)||ee(e,"ill-formed tag handle (first argument) of the TAG directive"),Lr.call(e.tagMap,i)&&ee(e,'there is a previously declared suffix for "'+i+'" tag handle'),fw.test(s)||ee(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=s}};function Br(t,e,r,n){var i,s,o,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||ee(t,"expected valid JSON character");else R3.test(a)&&ee(t,"the stream contains non-printable characters");t.result+=a}}function iw(t,e,r,n){var i,s,o,a;for(lr.isObject(r)||ee(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)s=i[o],Lr.call(e,s)||(hw(e,s,r[s]),n[s]=!0)}function ni(t,e,r,n,i,s,o,a){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&ee(t,"nested arrays are not supported inside keys"),typeof i=="object"&&tw(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&tw(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,u=s.length;l<u;l+=1)iw(t,e,s[l],r);else iw(t,e,s,r);else!t.json&&!Lr.call(r,i)&&Lr.call(e,i)&&(t.line=o||t.line,t.position=a||t.position,ee(t,"duplicated mapping key")),hw(e,i,s),delete r[i];return e}function Ef(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ee(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Be(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;dn(i);)i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Kt(i))for(Ef(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&Oa(t,"deficient indentation"),n}function Ba(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||ft(r)))}function Cf(t,e){e===1?t.result+=" ":e>1&&(t.result+=lr.repeat(`
|
|
108
|
+
`,e-1))}function q3(t,e,r){var n,i,s,o,a,l,u,f,c=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),ft(p)||ri(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),ft(i)||r&&ri(i)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),ft(i)||r&&ri(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),ft(n))break}else{if(t.position===t.lineStart&&Ba(t)||r&&ri(p))break;if(Kt(p))if(l=t.line,u=t.lineStart,f=t.lineIndent,Be(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=u,t.lineIndent=f;break}}a&&(Br(t,s,o,!1),Cf(t,t.line-l),s=o=t.position,a=!1),dn(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return Br(t,s,o,!1),t.result?!0:(t.kind=c,t.result=d,!1)}function H3(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Br(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Kt(r)?(Br(t,n,i,!0),Cf(t,Be(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Ba(t)?ee(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);ee(t,"unexpected end of the stream within a single quoted scalar")}function $3(t,e){var r,n,i,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return Br(t,r,t.position,!0),t.position++,!0;if(a===92){if(Br(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Kt(a))Be(t,!1,e);else if(a<256&&dw[a])t.result+=pw[a],t.position++;else if((o=Q3(a))>0){for(i=o,s=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=F3(a))>=0?s=(s<<4)+o:ee(t,"expected hexadecimal character");t.result+=j3(s),t.position++}else ee(t,"unknown escape sequence");r=n=t.position}else Kt(a)?(Br(t,r,n,!0),Cf(t,Be(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Ba(t)?ee(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}ee(t,"unexpected end of the stream within a double quoted scalar")}function W3(t,e){var r=!0,n,i=t.tag,s,o=t.anchor,a,l,u,f,c,d={},p,m,g,A;if(A=t.input.charCodeAt(t.position),A===91)l=93,c=!1,s=[];else if(A===123)l=125,c=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),A=t.input.charCodeAt(++t.position);A!==0;){if(Be(t,!0,e),A=t.input.charCodeAt(t.position),A===l)return t.position++,t.tag=i,t.anchor=o,t.kind=c?"mapping":"sequence",t.result=s,!0;r||ee(t,"missed comma between flow collection entries"),m=p=g=null,u=f=!1,A===63&&(a=t.input.charCodeAt(t.position+1),ft(a)&&(u=f=!0,t.position++,Be(t,!0,e))),n=t.line,ii(t,e,ka,!1,!0),m=t.tag,p=t.result,Be(t,!0,e),A=t.input.charCodeAt(t.position),(f||t.line===n)&&A===58&&(u=!0,A=t.input.charCodeAt(++t.position),Be(t,!0,e),ii(t,e,ka,!1,!0),g=t.result),c?ni(t,s,d,m,p,g):u?s.push(ni(t,null,d,m,p,g)):s.push(p),Be(t,!0,e),A=t.input.charCodeAt(t.position),A===44?(r=!0,A=t.input.charCodeAt(++t.position)):r=!1}ee(t,"unexpected end of the stream within a flow collection")}function K3(t,e){var r,n,i=vf,s=!1,o=!1,a=e,l=0,u=!1,f,c;if(c=t.input.charCodeAt(t.position),c===124)n=!1;else if(c===62)n=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)vf===i?i=c===43?ew:P3:ee(t,"repeat of a chomping mode identifier");else if((f=M3(c))>=0)f===0?ee(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ee(t,"repeat of an indentation width identifier"):(a=e+f-1,o=!0);else break;if(dn(c)){do c=t.input.charCodeAt(++t.position);while(dn(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!Kt(c)&&c!==0)}for(;c!==0;){for(Ef(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&c===32;)t.lineIndent++,c=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Kt(c)){l++;continue}if(t.lineIndent<a){i===ew?t.result+=lr.repeat(`
|
|
109
|
+
`,s?1+l:l):i===vf&&s&&(t.result+=`
|
|
110
|
+
`);break}for(n?dn(c)?(u=!0,t.result+=lr.repeat(`
|
|
111
|
+
`,s?1+l:l)):u?(u=!1,t.result+=lr.repeat(`
|
|
112
|
+
`,l+1)):l===0?s&&(t.result+=" "):t.result+=lr.repeat(`
|
|
113
|
+
`,l):t.result+=lr.repeat(`
|
|
114
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=t.position;!Kt(c)&&c!==0;)c=t.input.charCodeAt(++t.position);Br(t,r,t.position,!1)}return!0}function sw(t,e){var r,n=t.tag,i=t.anchor,s=[],o,a=!1,l;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&!(l!==45||(o=t.input.charCodeAt(t.position+1),!ft(o)));){if(a=!0,t.position++,Be(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,ii(t,e,cw,!1,!0),s.push(t.result),Be(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)ee(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function G3(t,e,r){var n,i,s,o,a=t.tag,l=t.anchor,u={},f={},c=null,d=null,p=null,m=!1,g=!1,A;for(t.anchor!==null&&(t.anchorMap[t.anchor]=u),A=t.input.charCodeAt(t.position);A!==0;){if(n=t.input.charCodeAt(t.position+1),s=t.line,o=t.position,(A===63||A===58)&&ft(n))A===63?(m&&(ni(t,u,f,c,d,null),c=d=p=null),g=!0,m=!0,i=!0):m?(m=!1,i=!0):ee(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,A=n;else if(ii(t,r,lw,!1,!0))if(t.line===s){for(A=t.input.charCodeAt(t.position);dn(A);)A=t.input.charCodeAt(++t.position);if(A===58)A=t.input.charCodeAt(++t.position),ft(A)||ee(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(ni(t,u,f,c,d,null),c=d=p=null),g=!0,m=!1,i=!1,c=t.tag,d=t.result;else if(g)ee(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=a,t.anchor=l,!0}else if(g)ee(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=a,t.anchor=l,!0;else break;if((t.line===s||t.lineIndent>e)&&(ii(t,e,Ia,!0,i)&&(m?d=t.result:p=t.result),m||(ni(t,u,f,c,d,p,s,o),c=d=p=null),Be(t,!0,-1),A=t.input.charCodeAt(t.position)),t.lineIndent>e&&A!==0)ee(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&ni(t,u,f,c,d,null),g&&(t.tag=a,t.anchor=l,t.kind="mapping",t.result=u),g}function J3(t){var e,r=!1,n=!1,i,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&ee(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):ee(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ft(o);)o===33&&(n?ee(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),uw.test(i)||ee(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),T3.test(s)&&ee(t,"tag suffix cannot contain flow indicator characters")}return s&&!fw.test(s)&&ee(t,"tag name cannot contain such characters: "+s),r?t.tag=s:Lr.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:ee(t,'undeclared tag handle "'+i+'"'),!0}function V3(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&ee(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!ft(r)&&!ri(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ee(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Y3(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!ft(n)&&!ri(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&ee(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Lr.call(t.anchorMap,r)||ee(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Be(t,!0,-1),!0}function ii(t,e,r,n,i){var s,o,a,l=1,u=!1,f=!1,c,d,p,m,g;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=Ia===r||cw===r,n&&Be(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;J3(t)||V3(t);)Be(t,!0,-1)?(u=!0,a=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||Ia===r)&&(ka===r||lw===r?m=e:m=e+1,g=t.position-t.lineStart,l===1?a&&(sw(t,g)||G3(t,g,m))||W3(t,m)?f=!0:(o&&K3(t,m)||H3(t,m)||$3(t,m)?f=!0:Y3(t)?(f=!0,(t.tag!==null||t.anchor!==null)&&ee(t,"alias node should not have any properties")):q3(t,m,ka===r)&&(f=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(f=a&&sw(t,g))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ee(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),c=0,d=t.implicitTypes.length;c<d;c+=1)if(p=t.implicitTypes[c],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else Lr.call(t.typeMap[t.kind||"fallback"],t.tag)?(p=t.typeMap[t.kind||"fallback"][t.tag],t.result!==null&&p.kind!==t.kind&&ee(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result)?(t.result=p.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ee(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):ee(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}function z3(t){var e=t.position,r,n,i,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(o=t.input.charCodeAt(t.position))!==0&&(Be(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!ft(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&ee(t,"directive name must not be less than one character in length");o!==0;){for(;dn(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Kt(o));break}if(Kt(o))break;for(r=t.position;o!==0&&!ft(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&Ef(t),Lr.call(nw,n)?nw[n](t,n,i):Oa(t,'unknown document directive "'+n+'"')}if(Be(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Be(t,!0,-1)):s&&ee(t,"directives end mark is expected"),ii(t,t.lineIndent-1,Ia,!1,!0),Be(t,!0,-1),t.checkLineBreaks&&N3.test(t.input.slice(e,t.position))&&Oa(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ba(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Be(t,!0,-1));return}if(t.position<t.length-1)ee(t,"end of the stream or a document separator is expected");else return}function gw(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
115
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new U3(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,ee(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)z3(r);return r.documents}function Aw(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=gw(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function yw(t,e){var r=gw(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new ow("expected a single document in the stream, but found more")}}function X3(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),Aw(t,e,lr.extend({schema:aw},r))}function Z3(t,e){return yw(t,lr.extend({schema:aw},e))}_s.exports.loadAll=Aw;_s.exports.load=yw;_s.exports.safeLoadAll=X3;_s.exports.safeLoad=Z3});var qw=R((Z6,If)=>{"use strict";var Es=cn(),Cs=Zn(),eL=bs(),tL=ti(),kw=Object.prototype.toString,Iw=Object.prototype.hasOwnProperty,rL=9,vs=10,nL=13,iL=32,sL=33,oL=34,Ow=35,aL=37,lL=38,cL=39,uL=42,Bw=44,fL=45,Lw=58,hL=61,dL=62,pL=63,mL=64,Dw=91,Pw=93,gL=96,Rw=123,AL=124,Nw=125,Ke={};Ke[0]="\\0";Ke[7]="\\a";Ke[8]="\\b";Ke[9]="\\t";Ke[10]="\\n";Ke[11]="\\v";Ke[12]="\\f";Ke[13]="\\r";Ke[27]="\\e";Ke[34]='\\"';Ke[92]="\\\\";Ke[133]="\\N";Ke[160]="\\_";Ke[8232]="\\L";Ke[8233]="\\P";var yL=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function wL(t,e){var r,n,i,s,o,a,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,s=n.length;i<s;i+=1)o=n[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&Iw.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}function bw(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new Cs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Es.repeat("0",n-e.length)+e}function bL(t){this.schema=t.schema||eL,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Es.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=wL(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function _w(t,e){for(var r=Es.repeat(" ",e),n=0,i=-1,s="",o,a=t.length;n<a;)i=t.indexOf(`
|
|
116
|
+
`,n),i===-1?(o=t.slice(n),n=a):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
|
|
117
|
+
`&&(s+=r),s+=o;return s}function xf(t,e){return`
|
|
118
|
+
`+Es.repeat(" ",t.indent*e)}function _L(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function kf(t){return t===iL||t===rL}function si(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function vL(t){return si(t)&&!kf(t)&&t!==65279&&t!==nL&&t!==vs}function vw(t,e){return si(t)&&t!==65279&&t!==Bw&&t!==Dw&&t!==Pw&&t!==Rw&&t!==Nw&&t!==Lw&&(t!==Ow||e&&vL(e))}function EL(t){return si(t)&&t!==65279&&!kf(t)&&t!==fL&&t!==pL&&t!==Lw&&t!==Bw&&t!==Dw&&t!==Pw&&t!==Rw&&t!==Nw&&t!==Ow&&t!==lL&&t!==uL&&t!==sL&&t!==AL&&t!==hL&&t!==dL&&t!==cL&&t!==oL&&t!==aL&&t!==mL&&t!==gL}function Tw(t){var e=/^\n* /;return e.test(t)}var Fw=1,Qw=2,Mw=3,jw=4,La=5;function CL(t,e,r,n,i){var s,o,a,l=!1,u=!1,f=n!==-1,c=-1,d=EL(t.charCodeAt(0))&&!kf(t.charCodeAt(t.length-1));if(e)for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),!si(o))return La;a=s>0?t.charCodeAt(s-1):null,d=d&&vw(o,a)}else{for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),o===vs)l=!0,f&&(u=u||s-c-1>n&&t[c+1]!==" ",c=s);else if(!si(o))return La;a=s>0?t.charCodeAt(s-1):null,d=d&&vw(o,a)}u=u||f&&s-c-1>n&&t[c+1]!==" "}return!l&&!u?d&&!i(t)?Fw:Qw:r>9&&Tw(t)?La:u?jw:Mw}function xL(t,e,r,n){t.dump=(function(){if(e.length===0)return"''";if(!t.noCompatMode&&yL.indexOf(e)!==-1)return"'"+e+"'";var i=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),o=n||t.flowLevel>-1&&r>=t.flowLevel;function a(l){return _L(t,l)}switch(CL(e,o,t.indent,s,a)){case Fw:return e;case Qw:return"'"+e.replace(/'/g,"''")+"'";case Mw:return"|"+Ew(e,t.indent)+Cw(_w(e,i));case jw:return">"+Ew(e,t.indent)+Cw(_w(SL(e,s),i));case La:return'"'+kL(e,s)+'"';default:throw new Cs("impossible error: invalid scalar style")}})()}function Ew(t,e){var r=Tw(t)?String(e):"",n=t[t.length-1]===`
|
|
119
|
+
`,i=n&&(t[t.length-2]===`
|
|
120
|
+
`||t===`
|
|
121
|
+
`),s=i?"+":n?"":"-";return r+s+`
|
|
122
|
+
`}function Cw(t){return t[t.length-1]===`
|
|
123
|
+
`?t.slice(0,-1):t}function SL(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=t.indexOf(`
|
|
124
|
+
`);return u=u!==-1?u:t.length,r.lastIndex=u,xw(t.slice(0,u),e)})(),i=t[0]===`
|
|
125
|
+
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",n+=a+(!i&&!s&&l!==""?`
|
|
126
|
+
`:"")+xw(l,e),i=s}return n}function xw(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,l="";n=r.exec(t);)a=n.index,a-i>e&&(s=o>i?o:a,l+=`
|
|
127
|
+
`+t.slice(i,s),i=s+1),o=a;return l+=`
|
|
128
|
+
`,t.length-i>e&&o>i?l+=t.slice(i,o)+`
|
|
129
|
+
`+t.slice(o+1):l+=t.slice(i),l.slice(1)}function kL(t){for(var e="",r,n,i,s=0;s<t.length;s++){if(r=t.charCodeAt(s),r>=55296&&r<=56319&&(n=t.charCodeAt(s+1),n>=56320&&n<=57343)){e+=bw((r-55296)*1024+n-56320+65536),s++;continue}i=Ke[r],e+=!i&&si(r)?t[s]:i||bw(r)}return e}function IL(t,e,r){var n="",i=t.tag,s,o;for(s=0,o=r.length;s<o;s+=1)pn(t,e,r[s],!1,!1)&&(s!==0&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function OL(t,e,r,n){var i="",s=t.tag,o,a;for(o=0,a=r.length;o<a;o+=1)pn(t,e+1,r[o],!0,!0)&&((!n||o!==0)&&(i+=xf(t,e)),t.dump&&vs===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function BL(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,l,u,f;for(o=0,a=s.length;o<a;o+=1)f="",o!==0&&(f+=", "),t.condenseFlow&&(f+='"'),l=s[o],u=r[l],pn(t,e,l,!1,!1)&&(t.dump.length>1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),pn(t,e,u,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}function LL(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,l,u,f,c,d;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Cs("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)d="",(!n||a!==0)&&(d+=xf(t,e)),u=o[a],f=r[u],pn(t,e+1,u,!0,!0,!0)&&(c=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,c&&(t.dump&&vs===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,c&&(d+=xf(t,e)),pn(t,e+1,f,!0,c)&&(t.dump&&vs===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=s,t.dump=i||"{}"}function Sw(t,e,r){var n,i,s,o,a,l;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(t.tag=r?a.tag:"?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,kw.call(a.represent)==="[object Function]")n=a.represent(e,l);else if(Iw.call(a.represent,l))n=a.represent[l](e,l);else throw new Cs("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function pn(t,e,r,n,i,s){t.tag=null,t.dump=r,Sw(t,r,!1)||Sw(t,r,!0);var o=kw.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,u;if(a&&(l=t.duplicates.indexOf(r),u=l!==-1),(t.tag!==null&&t.tag!=="?"||u||t.indent!==2&&e>0)&&(i=!1),u&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(a&&u&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(LL(t,e,t.dump,i),u&&(t.dump="&ref_"+l+t.dump)):(BL(t,e,t.dump),u&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object Array]"){var f=t.noArrayIndent&&e>0?e-1:e;n&&t.dump.length!==0?(OL(t,f,t.dump,i),u&&(t.dump="&ref_"+l+t.dump)):(IL(t,f,t.dump),u&&(t.dump="&ref_"+l+" "+t.dump))}else if(o==="[object String]")t.tag!=="?"&&xL(t,t.dump,e,s);else{if(t.skipInvalid)return!1;throw new Cs("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function DL(t,e){var r=[],n=[],i,s;for(Sf(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function Sf(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)Sf(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)Sf(t[n[i]],e,r)}function Uw(t,e){e=e||{};var r=new bL(e);return r.noRefs||DL(t,r),pn(r,0,t,!0,!0)?r.dump+`
|
|
130
|
+
`:""}function PL(t,e){return Uw(t,Es.extend({schema:tL},e))}If.exports.dump=Uw;If.exports.safeDump=PL});var $w=R((eQ,Ee)=>{"use strict";var Da=ww(),Hw=qw();function Pa(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Ee.exports.Type=Ne();Ee.exports.Schema=un();Ee.exports.FAILSAFE_SCHEMA=xa();Ee.exports.JSON_SCHEMA=wf();Ee.exports.CORE_SCHEMA=bf();Ee.exports.DEFAULT_SAFE_SCHEMA=ti();Ee.exports.DEFAULT_FULL_SCHEMA=bs();Ee.exports.load=Da.load;Ee.exports.loadAll=Da.loadAll;Ee.exports.safeLoad=Da.safeLoad;Ee.exports.safeLoadAll=Da.safeLoadAll;Ee.exports.dump=Hw.dump;Ee.exports.safeDump=Hw.safeDump;Ee.exports.YAMLException=Zn();Ee.exports.MINIMAL_SCHEMA=xa();Ee.exports.SAFE_SCHEMA=ti();Ee.exports.DEFAULT_SCHEMA=bs();Ee.exports.scan=Pa("scan");Ee.exports.parse=Pa("parse");Ee.exports.compose=Pa("compose");Ee.exports.addConstructor=Pa("addConstructor")});var Kw=R((tQ,Ww)=>{"use strict";var RL=$w();Ww.exports=RL});var Of=R((exports,module)=>{"use strict";var yaml=Kw(),engines=exports=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)};engines.json={parse:JSON.parse.bind(JSON),stringify:function(t,e){let r=Object.assign({replacer:null,space:2},e);return JSON.stringify(t,r.replacer,r.space)}};engines.javascript={parse:function parse(str,options,wrap){try{return wrap!==!1&&(str=`(function() {
|
|
131
|
+
return `+str.trim()+`;
|
|
132
|
+
}());`),eval(str)||{}}catch(t){if(wrap!==!1&&/(unexpected|identifier)/i.test(t.message))return parse(str,options,!1);throw new SyntaxError(t)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}});var Jw=R((rQ,Gw)=>{"use strict";Gw.exports=function(t){return typeof t=="string"&&t.charAt(0)==="\uFEFF"?t.slice(1):t}});var Ra=R(cr=>{"use strict";var Vw=Jw(),Yw=ys();cr.define=function(t,e,r){Reflect.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})};cr.isBuffer=function(t){return Yw(t)==="buffer"};cr.isObject=function(t){return Yw(t)==="object"};cr.toBuffer=function(t){return typeof t=="string"?Buffer.from(t):t};cr.toString=function(t){if(cr.isBuffer(t))return Vw(String(t));if(typeof t!="string")throw new TypeError("expected input to be a string or buffer");return Vw(t)};cr.arrayify=function(t){return t?Array.isArray(t)?t:[t]:[]};cr.startsWith=function(t,e,r){return typeof r!="number"&&(r=e.length),t.slice(0,r)===e}});var xs=R((iQ,zw)=>{"use strict";var NL=Of(),TL=Ra();zw.exports=function(t){let e=Object.assign({},t);return e.delimiters=TL.arrayify(e.delims||e.delimiters||"---"),e.delimiters.length===1&&e.delimiters.push(e.delimiters[0]),e.language=(e.language||e.lang||"yaml").toLowerCase(),e.engines=Object.assign({},NL,e.parsers,e.engines),e}});var Bf=R((sQ,Xw)=>{"use strict";Xw.exports=function(t,e){let r=e.engines[t]||e.engines[FL(t)];if(typeof r>"u")throw new Error('gray-matter engine "'+t+'" is not registered');return typeof r=="function"&&(r={parse:r}),r};function FL(t){switch(t.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return t}}});var Lf=R((oQ,Zw)=>{"use strict";var QL=ys(),ML=Bf(),jL=xs();Zw.exports=function(t,e,r){if(e==null&&r==null)switch(QL(t)){case"object":e=t.data,r={};break;case"string":return t;default:throw new TypeError("expected file to be a string or object")}let n=t.content,i=jL(r);if(e==null){if(!i.data)return t;e=i.data}let s=t.language||i.language,o=ML(s,i);if(typeof o.stringify!="function")throw new TypeError('expected "'+s+'.stringify" to be a function');e=Object.assign({},t.data,e);let a=i.delimiters[0],l=i.delimiters[1],u=o.stringify(e,r).trim(),f="";return u!=="{}"&&(f=oi(a)+oi(u)+oi(l)),typeof t.excerpt=="string"&&t.excerpt!==""&&n.indexOf(t.excerpt.trim())===-1&&(f+=oi(t.excerpt)+oi(l)),f+oi(n)};function oi(t){return t.slice(-1)!==`
|
|
133
|
+
`?t+`
|
|
134
|
+
`:t}});var t1=R((aQ,e1)=>{"use strict";var UL=xs();e1.exports=function(t,e){let r=UL(e);if(t.data==null&&(t.data={}),typeof r.excerpt=="function")return r.excerpt(t,r);let n=t.data.excerpt_separator||r.excerpt_separator;if(n==null&&(r.excerpt===!1||r.excerpt==null))return t;let i=typeof r.excerpt=="string"?r.excerpt:n||r.delimiters[0],s=t.content.indexOf(i);return s!==-1&&(t.excerpt=t.content.slice(0,s)),t}});var i1=R((lQ,n1)=>{"use strict";var r1=ys(),qL=Lf(),ai=Ra();n1.exports=function(t){return r1(t)!=="object"&&(t={content:t}),r1(t.data)!=="object"&&(t.data={}),t.contents&&t.content==null&&(t.content=t.contents),ai.define(t,"orig",ai.toBuffer(t.content)),ai.define(t,"language",t.language||""),ai.define(t,"matter",t.matter||""),ai.define(t,"stringify",function(e,r){return r&&r.language&&(t.language=r.language),qL(t,e,r)}),t.content=ai.toString(t.content),t.isEmpty=!1,t.excerpt="",t}});var o1=R((cQ,s1)=>{"use strict";var HL=Bf(),$L=xs();s1.exports=function(t,e,r){let n=$L(r),i=HL(t,n);if(typeof i.parse!="function")throw new TypeError('expected "'+t+'.parse" to be a function');return i.parse(e,n)}});var u1=R((uQ,c1)=>{"use strict";var WL=le("fs"),KL=ty(),Df=xs(),GL=Lf(),a1=t1(),JL=Of(),VL=i1(),YL=o1(),l1=Ra();function tt(t,e){if(t==="")return{data:{},content:t,excerpt:"",orig:t};let r=VL(t),n=tt.cache[r.content];if(!e){if(n)return r=Object.assign({},n),r.orig=n.orig,r;tt.cache[r.content]=r}return zL(r,e)}function zL(t,e){let r=Df(e),n=r.delimiters[0],i=`
|
|
135
|
+
`+r.delimiters[1],s=t.content;r.language&&(t.language=r.language);let o=n.length;if(!l1.startsWith(s,n,o))return a1(t,r),t;if(s.charAt(o)===n.slice(-1))return t;s=s.slice(o);let a=s.length,l=tt.language(s,r);l.name&&(t.language=l.name,s=s.slice(l.raw.length));let u=s.indexOf(i);return u===-1&&(u=a),t.matter=s.slice(0,u),t.matter.replace(/^\s*#[^\n]+/gm,"").trim()===""?(t.isEmpty=!0,t.empty=t.content,t.data={}):t.data=YL(t.language,t.matter,r),u===a?t.content="":(t.content=s.slice(u+i.length),t.content[0]==="\r"&&(t.content=t.content.slice(1)),t.content[0]===`
|
|
136
|
+
`&&(t.content=t.content.slice(1))),a1(t,r),(r.sections===!0||typeof r.section=="function")&&KL(t,r.section),t}tt.engines=JL;tt.stringify=function(t,e,r){return typeof t=="string"&&(t=tt(t,r)),GL(t,e,r)};tt.read=function(t,e){let r=WL.readFileSync(t,"utf8"),n=tt(r,e);return n.path=t,n};tt.test=function(t,e){return l1.startsWith(t,Df(e).delimiters[0])};tt.language=function(t,e){let n=Df(e).delimiters[0];tt.test(t)&&(t=t.slice(n.length));let i=t.slice(0,t.search(/\r?\n/));return{raw:i,name:i?i.trim():""}};tt.cache={};tt.clearCache=function(){tt.cache={}};c1.exports=tt});var rt=R(yt=>{"use strict";yt.__esModule=!0;yt.extend=v1;yt.indexOf=dD;yt.escapeExpression=pD;yt.isEmpty=mD;yt.createFrame=gD;yt.blockParams=AD;yt.appendContextPath=yD;var cD={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},uD=/[&<>"'`=]/g,fD=/[&<>"'`=]/;function hD(t){return cD[t]}function v1(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 Qf=Object.prototype.toString;yt.toString=Qf;var Ff=function(e){return typeof e=="function"};Ff(/x/)&&(yt.isFunction=Ff=function(t){return typeof t=="function"&&Qf.call(t)==="[object Function]"});yt.isFunction=Ff;var E1=Array.isArray||function(t){return t&&typeof t=="object"?Qf.call(t)==="[object Array]":!1};yt.isArray=E1;function dD(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function pD(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return fD.test(t)?t.replace(uD,hD):t}function mD(t){return!t&&t!==0?!0:!!(E1(t)&&t.length===0)}function gD(t){var e=v1({},t);return e._parent=t,e}function AD(t,e){return t.path=e,t}function yD(t,e){return(t?t+".":"")+e}});var wt=R((Ma,C1)=>{"use strict";Ma.__esModule=!0;var Mf=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function jf(t,e){var r=e&&e.loc,n=void 0,i=void 0,s=void 0,o=void 0;r&&(n=r.start.line,i=r.end.line,s=r.start.column,o=r.end.column,t+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,t),l=0;l<Mf.length;l++)this[Mf[l]]=a[Mf[l]];Error.captureStackTrace&&Error.captureStackTrace(this,jf);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{}}jf.prototype=new Error;Ma.default=jf;C1.exports=Ma.default});var S1=R((ja,x1)=>{"use strict";ja.__esModule=!0;var Uf=rt();ja.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(Uf.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=Uf.createFrame(r.data);s.contextPath=Uf.appendContextPath(r.data.contextPath,r.name),r={data:s}}return i(e,r)})};x1.exports=ja.default});var I1=R((Ua,k1)=>{"use strict";Ua.__esModule=!0;function wD(t){return t&&t.__esModule?t:{default:t}}var Ss=rt(),bD=wt(),_D=wD(bD);Ua.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new _D.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=Ss.appendContextPath(r.data.contextPath,r.ids[0])+"."),Ss.isFunction(e)&&(e=e.call(this)),r.data&&(a=Ss.createFrame(r.data));function u(m,g,A){a&&(a.key=m,a.index=g,a.first=g===0,a.last=!!A,l&&(a.contextPath=l+m)),o=o+n(e[m],{data:a,blockParams:Ss.blockParams([e[m],m],[l+m,null])})}if(e&&typeof e=="object")if(Ss.isArray(e))for(var f=e.length;s<f;s++)s in e&&u(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var c=[],d=e[Symbol.iterator](),p=d.next();!p.done;p=d.next())c.push(p.value);e=c;for(var f=e.length;s<f;s++)u(s,s,s===e.length-1)}else(function(){var m=void 0;Object.keys(e).forEach(function(g){m!==void 0&&u(m,s-1),m=g,s++}),m!==void 0&&u(m,s-1,!0)})();return s===0&&(o=i(this)),o})};k1.exports=Ua.default});var B1=R((qa,O1)=>{"use strict";qa.__esModule=!0;function vD(t){return t&&t.__esModule?t:{default:t}}var ED=wt(),CD=vD(ED);qa.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new CD.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};O1.exports=qa.default});var R1=R((Ha,P1)=>{"use strict";Ha.__esModule=!0;function xD(t){return t&&t.__esModule?t:{default:t}}var L1=rt(),SD=wt(),D1=xD(SD);Ha.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new D1.default("#if requires exactly one argument");return L1.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||L1.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new D1.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};P1.exports=Ha.default});var T1=R(($a,N1)=>{"use strict";$a.__esModule=!0;$a.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)})};N1.exports=$a.default});var Q1=R((Wa,F1)=>{"use strict";Wa.__esModule=!0;Wa.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};F1.exports=Wa.default});var j1=R((Ka,M1)=>{"use strict";Ka.__esModule=!0;function kD(t){return t&&t.__esModule?t:{default:t}}var ks=rt(),ID=wt(),OD=kD(ID);Ka.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new OD.default("#with requires exactly one argument");ks.isFunction(e)&&(e=e.call(this));var n=r.fn;if(ks.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=ks.createFrame(r.data),i.contextPath=ks.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:ks.blockParams([e],[i&&i.contextPath])})})};M1.exports=Ka.default});var qf=R(Ga=>{"use strict";Ga.__esModule=!0;Ga.registerDefaultHelpers=$D;Ga.moveHelperToHooks=WD;function mn(t){return t&&t.__esModule?t:{default:t}}var BD=S1(),LD=mn(BD),DD=I1(),PD=mn(DD),RD=B1(),ND=mn(RD),TD=R1(),FD=mn(TD),QD=T1(),MD=mn(QD),jD=Q1(),UD=mn(jD),qD=j1(),HD=mn(qD);function $D(t){LD.default(t),PD.default(t),ND.default(t),FD.default(t),MD.default(t),UD.default(t),HD.default(t)}function WD(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var q1=R((Ja,U1)=>{"use strict";Ja.__esModule=!0;var KD=rt();Ja.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=KD.extend({},l,r.partials);var u=e(o,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,s})};U1.exports=Ja.default});var H1=R(Hf=>{"use strict";Hf.__esModule=!0;Hf.registerDefaultDecorators=YD;function GD(t){return t&&t.__esModule?t:{default:t}}var JD=q1(),VD=GD(JD);function YD(t){VD.default(t)}});var $f=R((Va,$1)=>{"use strict";Va.__esModule=!0;var zD=rt(),li={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=zD.indexOf(li.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=li.lookupLevel(e),typeof console<"u"&&li.lookupLevel(li.level)<=e){var r=li.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)}}};Va.default=li;$1.exports=Va.default});var Wf=R(Is=>{"use strict";Is.__esModule=!0;Is.createProtoAccessControl=tP;Is.resultIsAllowed=rP;Is.resetLoggedProperties=iP;function XD(t){return t&&t.__esModule?t:{default:t}}var W1=rt(),ZD=$f(),eP=XD(ZD),Ya=Object.create(null);function tP(t){var e=Object.create(null);e.__proto__=!1,W1.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,W1.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function rP(t,e,r){return K1(typeof t=="function"?e.methods:e.properties,r)}function K1(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(nP(e),!1)}function nP(t){Ya[t]!==!0&&(Ya[t]=!0,eP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
137
|
+
You can add a runtime option to disable the check or this warning:
|
|
138
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function iP(){Object.keys(Ya).forEach(function(t){delete Ya[t]})}});var Xa=R(Gt=>{"use strict";Gt.__esModule=!0;Gt.HandlebarsEnvironment=Jf;function G1(t){return t&&t.__esModule?t:{default:t}}var gn=rt(),sP=wt(),Kf=G1(sP),oP=qf(),aP=H1(),lP=$f(),za=G1(lP),cP=Wf(),uP="4.7.9";Gt.VERSION=uP;var fP=8;Gt.COMPILER_REVISION=fP;var hP=7;Gt.LAST_COMPATIBLE_COMPILER_REVISION=hP;var dP={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"};Gt.REVISION_CHANGES=dP;var Gf="[object Object]";function Jf(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},oP.registerDefaultHelpers(this),aP.registerDefaultDecorators(this)}Jf.prototype={constructor:Jf,logger:za.default,log:za.default.log,registerHelper:function(e,r){if(gn.toString.call(e)===Gf){if(r)throw new Kf.default("Arg not supported with multiple helpers");gn.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(gn.toString.call(e)===Gf)gn.extend(this.partials,e);else{if(typeof r>"u")throw new Kf.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(gn.toString.call(e)===Gf){if(r)throw new Kf.default("Arg not supported with multiple decorators");gn.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){cP.resetLoggedProperties()}};var pP=za.default.log;Gt.log=pP;Gt.createFrame=gn.createFrame;Gt.logger=za.default});var V1=R((Za,J1)=>{"use strict";Za.__esModule=!0;function Vf(t){this.string=t}Vf.prototype.toString=Vf.prototype.toHTML=function(){return""+this.string};Za.default=Vf;J1.exports=Za.default});var Y1=R(Yf=>{"use strict";Yf.__esModule=!0;Yf.wrapHelper=mP;function mP(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 rb=R(Dr=>{"use strict";Dr.__esModule=!0;Dr.checkRevision=_P;Dr.template=vP;Dr.wrapProgram=el;Dr.resolvePartial=EP;Dr.invokePartial=CP;Dr.noop=eb;function gP(t){return t&&t.__esModule?t:{default:t}}function AP(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 yP=rt(),ci=AP(yP),wP=wt(),ur=gP(wP),fr=Xa(),z1=qf(),bP=Y1(),X1=Wf();function _P(t){var e=t&&t[0]||1,r=fr.COMPILER_REVISION;if(!(e>=fr.LAST_COMPATIBLE_COMPILER_REVISION&&e<=fr.COMPILER_REVISION))if(e<fr.LAST_COMPATIBLE_COMPILER_REVISION){var n=fr.REVISION_CHANGES[r],i=fr.REVISION_CHANGES[e];throw new ur.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 ur.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 vP(t,e){if(!e)throw new ur.default("No environment passed to template");if(!t||!t.main)throw new ur.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=ci.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 u=e.VM.invokePartial.call(this,o,a,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(o,t.compilerOptions,e),u=l.partials[l.name](a,l)),u!=null){if(l.indent){for(var f=u.split(`
|
|
139
|
+
`),c=0,d=f.length;c<d&&!(!f[c]&&c+1===d);c++)f[c]=l.indent+f[c];u=f.join(`
|
|
140
|
+
`)}return u}else throw new ur.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new ur.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||X1.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,f=0;f<u;f++){var c=a[f]&&i.lookupProperty(a[f],l);if(c!=null)return c}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:ci.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,f,c){var d=this.programs[a],p=this.fn(a);return l||c||f||u?d=el(this,a,p,l,u,f,c):d||(d=this.programs[a]=el(this,a,p)),d},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=ci.extend({},l,a)),u},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=xP(o,l));var u=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=o!=a.depths[0]?[o].concat(a.depths):a.depths:u=[o]);function c(d){return""+t.main(i,d,i.helpers,i.partials,l,f,u)}return c=tb(t.main,c,i,a.depths||[],l,f),c(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={};Z1(a,e.helpers,i),Z1(a,o.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=ci.extend({},e.decorators,o.decorators)),i.hooks={},i.protoAccessControl=X1.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;z1.moveHelperToHooks(i,"helperMissing",l),z1.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(o,a,l,u){if(t.useBlockParams&&!l)throw new ur.default("must pass block params");if(t.useDepths&&!u)throw new ur.default("must pass parent depths");return el(i,o,t[o],a,0,l,u)},s}function el(t,e,r,n,i,s,o){function a(l){var u=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,u.data||n,s&&[u.blockParams].concat(s),f)}return a=tb(r,a,t,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=i||0,a}function EP(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=tl(r.partials,t)):r.name==="@partial-block"?t=tl(r.data,"partial-block"):t=tl(r.partials,r.name),t}function CP(t,e,r){var n=tl(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!==eb&&(function(){r.data=fr.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=fr.createFrame(l.data),l.data["partial-block"]=n,s(a,l)},s.partials&&(r.partials=ci.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new ur.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function eb(){return""}function tl(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function xP(t,e){return(!e||!("root"in e))&&(e=e?fr.createFrame(e):{},e.root=t),e}function tb(t,e,r,n,i,s){if(t.decorator){var o={};e=t.decorator(e,o,r,n&&n[0],i,s,n),ci.extend(e,o)}return e}function Z1(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=SP(i,r)})}function SP(t,e){var r=e.lookupProperty;return bP.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var zf=R((rl,nb)=>{"use strict";rl.__esModule=!0;rl.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}};nb.exports=rl.default});var lb=R((nl,ab)=>{"use strict";nl.__esModule=!0;function Zf(t){return t&&t.__esModule?t:{default:t}}function eh(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 kP=Xa(),ib=eh(kP),IP=V1(),OP=Zf(IP),BP=wt(),LP=Zf(BP),DP=rt(),Xf=eh(DP),PP=rb(),sb=eh(PP),RP=zf(),NP=Zf(RP);function ob(){var t=new ib.HandlebarsEnvironment;return Xf.extend(t,ib),t.SafeString=OP.default,t.Exception=LP.default,t.Utils=Xf,t.escapeExpression=Xf.escapeExpression,t.VM=sb,t.template=function(e){return sb.template(e,t)},t}var Os=ob();Os.create=ob;NP.default(Os);Os.default=Os;nl.default=Os;ab.exports=nl.default});var th=R((il,ub)=>{"use strict";il.__esModule=!0;var cb={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&&!cb.helpers.scopedId(e)&&!e.depth}}};il.default=cb;ub.exports=il.default});var hb=R((sl,fb)=>{"use strict";sl.__esModule=!0;var TP=(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,u,f){var c=u.length-1;switch(l){case 1:return u[c-1];case 2:this.$=a.prepareProgram(u[c]);break;case 3:this.$=u[c];break;case 4:this.$=u[c];break;case 5:this.$=u[c];break;case 6:this.$=u[c];break;case 7:this.$=u[c];break;case 8:this.$=u[c];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[c]),strip:a.stripFlags(u[c],u[c]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[c],value:u[c],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[c-2],u[c-1],u[c],this._$);break;case 12:this.$={path:u[c-3],params:u[c-2],hash:u[c-1]};break;case 13:this.$=a.prepareBlock(u[c-3],u[c-2],u[c-1],u[c],!1,this._$);break;case 14:this.$=a.prepareBlock(u[c-3],u[c-2],u[c-1],u[c],!0,this._$);break;case 15:this.$={open:u[c-5],path:u[c-4],params:u[c-3],hash:u[c-2],blockParams:u[c-1],strip:a.stripFlags(u[c-5],u[c])};break;case 16:this.$={path:u[c-4],params:u[c-3],hash:u[c-2],blockParams:u[c-1],strip:a.stripFlags(u[c-5],u[c])};break;case 17:this.$={path:u[c-4],params:u[c-3],hash:u[c-2],blockParams:u[c-1],strip:a.stripFlags(u[c-5],u[c])};break;case 18:this.$={strip:a.stripFlags(u[c-1],u[c-1]),program:u[c]};break;case 19:var d=a.prepareBlock(u[c-2],u[c-1],u[c],u[c],!1,this._$),p=a.prepareProgram([d],u[c-1].loc);p.chained=!0,this.$={strip:u[c-2].strip,program:p,chain:!0};break;case 20:this.$=u[c];break;case 21:this.$={path:u[c-1],strip:a.stripFlags(u[c-2],u[c])};break;case 22:this.$=a.prepareMustache(u[c-3],u[c-2],u[c-1],u[c-4],a.stripFlags(u[c-4],u[c]),this._$);break;case 23:this.$=a.prepareMustache(u[c-3],u[c-2],u[c-1],u[c-4],a.stripFlags(u[c-4],u[c]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[c-3],params:u[c-2],hash:u[c-1],indent:"",strip:a.stripFlags(u[c-4],u[c]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[c-2],u[c-1],u[c],this._$);break;case 26:this.$={path:u[c-3],params:u[c-2],hash:u[c-1],strip:a.stripFlags(u[c-4],u[c])};break;case 27:this.$=u[c];break;case 28:this.$=u[c];break;case 29:this.$={type:"SubExpression",path:u[c-3],params:u[c-2],hash:u[c-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[c],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[c-2]),value:u[c],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[c-1]);break;case 33:this.$=u[c];break;case 34:this.$=u[c];break;case 35:this.$={type:"StringLiteral",value:u[c],original:u[c],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[c]),original:Number(u[c]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[c]==="true",original:u[c]==="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.$=u[c];break;case 41:this.$=u[c];break;case 42:this.$=a.preparePath(!0,u[c],this._$);break;case 43:this.$=a.preparePath(!1,u[c],this._$);break;case 44:u[c-2].push({part:a.id(u[c]),original:u[c],separator:u[c-1]}),this.$=u[c-2];break;case 45:this.$=[{part:a.id(u[c]),original:u[c]}];break;case 46:this.$=[];break;case 47:u[c-1].push(u[c]);break;case 48:this.$=[];break;case 49:u[c-1].push(u[c]);break;case 50:this.$=[];break;case 51:u[c-1].push(u[c]);break;case 58:this.$=[];break;case 59:u[c-1].push(u[c]);break;case 64:this.$=[];break;case 65:u[c-1].push(u[c]);break;case 70:this.$=[];break;case 71:u[c-1].push(u[c]);break;case 78:this.$=[];break;case 79:u[c-1].push(u[c]);break;case 82:this.$=[];break;case 83:u[c-1].push(u[c]);break;case 86:this.$=[];break;case 87:u[c-1].push(u[c]);break;case 90:this.$=[];break;case 91:u[c-1].push(u[c]);break;case 94:this.$=[];break;case 95:u[c-1].push(u[c]);break;case 98:this.$=[u[c]];break;case 99:u[c-1].push(u[c]);break;case 100:this.$=[u[c]];break;case 101:u[c-1].push(u[c]);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=[],u=this.table,f="",c=0,d=0,p=0,m=2,g=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 A=this.lexer.yylloc;l.push(A);var y=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function _(K){o.length=o.length-2*K,a.length=a.length-K,l.length=l.length-K}function b(){var K;return K=s.lexer.lex()||1,typeof K!="number"&&(K=s.symbols_[K]||K),K}for(var E,v,C,O,M,q,F={},B,P,L,D;;){if(C=o[o.length-1],this.defaultActions[C]?O=this.defaultActions[C]:((E===null||typeof E>"u")&&(E=b()),O=u[C]&&u[C][E]),typeof O>"u"||!O.length||!O[0]){var j="";if(!p){D=[];for(B in u[C])this.terminals_[B]&&B>2&&D.push("'"+this.terminals_[B]+"'");this.lexer.showPosition?j="Parse error on line "+(c+1)+`:
|
|
141
|
+
`+this.lexer.showPosition()+`
|
|
142
|
+
Expecting `+D.join(", ")+", got '"+(this.terminals_[E]||E)+"'":j="Parse error on line "+(c+1)+": Unexpected "+(E==1?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(j,{text:this.lexer.match,token:this.terminals_[E]||E,line:this.lexer.yylineno,loc:A,expected:D})}}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+E);switch(O[0]){case 1:o.push(E),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),o.push(O[1]),E=null,v?(E=v,v=null):(d=this.lexer.yyleng,f=this.lexer.yytext,c=this.lexer.yylineno,A=this.lexer.yylloc,p>0&&p--);break;case 2:if(P=this.productions_[O[1]][1],F.$=a[a.length-P],F._$={first_line:l[l.length-(P||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(P||1)].first_column,last_column:l[l.length-1].last_column},y&&(F._$.range=[l[l.length-(P||1)].range[0],l[l.length-1].range[1]]),q=this.performAction.call(F,f,d,c,this.yy,O[1],a,l),typeof q<"u")return q;P&&(o=o.slice(0,-1*P*2),a=a.slice(0,-1*P),l=l.slice(0,-1*P)),o.push(this.productions_[O[1]][0]),a.push(F.$),l.push(F._$),L=u[o[o.length-2]][o[o.length-1]],o.push(L);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 u=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=[u[0],u[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()+`
|
|
143
|
+
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,a,l,u,f;this._more||(this.yytext="",this.match="");for(var c=this._currentRules(),d=0;d<c.length&&(a=this._input.match(this.rules[c[d]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,l=d,!this.options.flex)));d++);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,c[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.
|
|
144
|
+
`+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 u(c,d){return o.yytext=o.yytext.substring(c,o.yyleng-d+c)}var f=l;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(u(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:(u(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=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.yytext=u(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})();sl.default=TP;fb.exports=sl.default});var cl=R((ll,mb)=>{"use strict";ll.__esModule=!0;function FP(t){return t&&t.__esModule?t:{default:t}}var QP=wt(),rh=FP(QP);function ol(){this.parents=[]}ol.prototype={constructor:ol,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!ol.prototype[n.type])throw new rh.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 rh.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(!this[e.type])throw new rh.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:al,Decorator:al,BlockStatement:db,DecoratorBlock:db,PartialStatement:pb,PartialBlockStatement:function(e){pb.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:al,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 al(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function db(t){al.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function pb(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ll.default=ol;mb.exports=ll.default});var Ab=R((ul,gb)=>{"use strict";ul.__esModule=!0;function MP(t){return t&&t.__esModule?t:{default:t}}var jP=cl(),UP=MP(jP);function Jt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Jt.prototype=new UP.default;Jt.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=nh(n,i,r),u=ih(n,i,r),f=a.openStandalone&&l,c=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&An(n,i,!0),a.open&&Pr(n,i,!0),e&&d&&(An(n,i),Pr(n,i)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(An((o.program||o.inverse).body),Pr(n,i)),e&&c&&(An(n,i),Pr((o.inverse||o.program).body))}}return t};Jt.prototype.BlockStatement=Jt.prototype.DecoratorBlock=Jt.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:ih(e.body),closeStandalone:nh((n||e).body)};if(t.openStrip.close&&An(e.body,null,!0),r){var o=t.inverseStrip;o.open&&Pr(e.body,null,!0),o.close&&An(n.body,null,!0),t.closeStrip.open&&Pr(i.body,null,!0),!this.options.ignoreStandalone&&nh(e.body)&&ih(n.body)&&(Pr(e.body),An(n.body))}else t.closeStrip.open&&Pr(e.body,null,!0);return s};Jt.prototype.Decorator=Jt.prototype.MustacheStatement=function(t){return t.strip};Jt.prototype.PartialStatement=Jt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function nh(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?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function ih(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 An(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 Pr(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+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}ul.default=Jt;gb.exports=ul.default});var yb=R(Pt=>{"use strict";Pt.__esModule=!0;Pt.SourceLocation=$P;Pt.id=WP;Pt.stripFlags=KP;Pt.stripComment=GP;Pt.preparePath=JP;Pt.prepareMustache=VP;Pt.prepareRawBlock=YP;Pt.prepareBlock=zP;Pt.prepareProgram=XP;Pt.preparePartialBlock=ZP;function qP(t){return t&&t.__esModule?t:{default:t}}var HP=wt(),sh=qP(HP);function oh(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new sh.default(t.path.original+" doesn't match "+e,r)}}function $P(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 WP(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function KP(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function GP(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function JP(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,u=e[o].original!==l;if(n+=(e[o].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new sh.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 VP(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 YP(t,e,r,n){oh(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 zP(t,e,r,n,i,s){n&&n.path&&oh(t,n);var o=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(o)throw new sh.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 XP(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 ZP(t,e,r,n){return oh(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 bb=R(Ls=>{"use strict";Ls.__esModule=!0;Ls.parseWithoutProcessing=wb;Ls.parse=lR;function eR(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 ch(t){return t&&t.__esModule?t:{default:t}}var tR=hb(),ah=ch(tR),rR=Ab(),nR=ch(rR),iR=yb(),sR=eR(iR),oR=wt(),Bs=ch(oR),aR=rt();Ls.parser=ah.default;var fl={};aR.extend(fl,sR);function wb(t,e){if(t.type==="Program")return cR(t),t;ah.default.yy=fl,fl.locInfo=function(n){return new fl.SourceLocation(e&&e.srcName,n)};var r=ah.default.parse(t);return r}function lR(t,e){var r=wb(t,e),n=new nR.default(e);return n.accept(r)}function cR(t){lh(t)}function lh(t){if(t!=null){if(Array.isArray(t)){t.forEach(lh);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!uR(t.depth))throw new Bs.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Bs.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<t.parts.length;e++)if(typeof t.parts[e]!="string")throw new Bs.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Bs.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Bs.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&lh(t[r])})}}}function uR(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Cb=R(Ns=>{"use strict";Ns.__esModule=!0;Ns.Compiler=uh;Ns.precompile=pR;Ns.compile=mR;function vb(t){return t&&t.__esModule?t:{default:t}}var fR=wt(),Ps=vb(fR),Rs=rt(),hR=th(),Ds=vb(hR),dR=[].slice;function uh(){}uh.prototype={compiler:uh,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||!Eb(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=Rs.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(!this[e.type])throw new Ps.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(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){_b(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 Ps.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){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){_b(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",i.depth),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 Ps.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,Ds.default.helpers.simpleId(s))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Ds.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;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:dR.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Ds.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Ds.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){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!Ds.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}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&&Rs.indexOf(i,e);if(i&&s>=0)return[r,s]}}};function pR(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Ps.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 mR(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Ps.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Rs.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,u){return n||(n=i()),n._child(o,a,l,u)},s}function Eb(t,e){if(t===e)return!0;if(Rs.isArray(t)&&Rs.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Eb(t[r],e[r]))return!1;return!0}}function _b(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 Sb=R(fh=>{var xb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");fh.encode=function(t){if(0<=t&&t<xb.length)return xb[t];throw new TypeError("Must be between 0 and 63: "+t)};fh.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,l=47,u=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+f:t==a?62:t==l?63:-1}});var ph=R(dh=>{var kb=Sb(),hh=5,Ib=1<<hh,Ob=Ib-1,Bb=Ib;function gR(t){return t<0?(-t<<1)+1:(t<<1)+0}function AR(t){var e=(t&1)===1,r=t>>1;return e?-r:r}dh.encode=function(e){var r="",n,i=gR(e);do n=i&Ob,i>>>=hh,i>0&&(n|=Bb),r+=kb.encode(n);while(i>0);return r};dh.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=kb.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&Bb),l&=Ob,s=s+(l<<o),o+=hh}while(a);n.value=AR(s),n.rest=r}});var hi=R(Ge=>{function yR(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ge.getArg=yR;var Lb=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,wR=/^data:.+\,.+$/;function Ts(t){var e=t.match(Lb);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ge.urlParse=Ts;function ui(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}Ge.urlGenerate=ui;function mh(t){var e=t,r=Ts(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ge.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,ui(r)):e}Ge.normalize=mh;function Db(t,e){t===""&&(t="."),e===""&&(e=".");var r=Ts(e),n=Ts(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),ui(r);if(r||e.match(wR))return e;if(n&&!n.host&&!n.path)return n.host=e,ui(n);var i=e.charAt(0)==="/"?e:mh(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,ui(n)):i}Ge.join=Db;Ge.isAbsolute=function(t){return t.charAt(0)==="/"||Lb.test(t)};function bR(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)}Ge.relative=bR;var Pb=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Rb(t){return t}function _R(t){return Nb(t)?"$"+t:t}Ge.toSetString=Pb?Rb:_R;function vR(t){return Nb(t)?t.slice(1):t}Ge.fromSetString=Pb?Rb:vR;function Nb(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 ER(t,e,r){var n=fi(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:fi(t.name,e.name)}Ge.compareByOriginalPositions=ER;function CR(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=fi(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:fi(t.name,e.name)}Ge.compareByGeneratedPositionsDeflated=CR;function fi(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function xR(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=fi(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:fi(t.name,e.name)}Ge.compareByGeneratedPositionsInflated=xR;function SR(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ge.parseSourceMapInput=SR;function kR(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Ts(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=Db(ui(n),e)}return mh(e)}Ge.computeSourceURL=kR});var yh=R(Tb=>{var gh=hi(),Ah=Object.prototype.hasOwnProperty,yn=typeof Map<"u";function hr(){this._array=[],this._set=yn?new Map:Object.create(null)}hr.fromArray=function(e,r){for(var n=new hr,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};hr.prototype.size=function(){return yn?this._set.size:Object.getOwnPropertyNames(this._set).length};hr.prototype.add=function(e,r){var n=yn?e:gh.toSetString(e),i=yn?this.has(e):Ah.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(yn?this._set.set(e,s):this._set[n]=s)};hr.prototype.has=function(e){if(yn)return this._set.has(e);var r=gh.toSetString(e);return Ah.call(this._set,r)};hr.prototype.indexOf=function(e){if(yn){var r=this._set.get(e);if(r>=0)return r}else{var n=gh.toSetString(e);if(Ah.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};hr.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};hr.prototype.toArray=function(){return this._array.slice()};Tb.ArraySet=hr});var Mb=R(Qb=>{var Fb=hi();function IR(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||Fb.compareByGeneratedPositionsInflated(t,e)<=0}function hl(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}hl.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};hl.prototype.add=function(e){IR(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};hl.prototype.toArray=function(){return this._sorted||(this._array.sort(Fb.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Qb.MappingList=hl});var wh=R(jb=>{var Fs=ph(),Le=hi(),dl=yh().ArraySet,OR=Mb().MappingList;function Rt(t){t||(t={}),this._file=Le.getArg(t,"file",null),this._sourceRoot=Le.getArg(t,"sourceRoot",null),this._skipValidation=Le.getArg(t,"skipValidation",!1),this._sources=new dl,this._names=new dl,this._mappings=new OR,this._sourcesContents=null}Rt.prototype._version=3;Rt.fromSourceMap=function(e){var r=e.sourceRoot,n=new Rt({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=Le.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=Le.relative(r,i)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(i);o!=null&&n.setSourceContent(i,o)}),n};Rt.prototype.addMapping=function(e){var r=Le.getArg(e,"generated"),n=Le.getArg(e,"original",null),i=Le.getArg(e,"source",null),s=Le.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})};Rt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Le.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Le.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Le.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Rt.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=Le.relative(s,i));var o=new dl,a=new dl;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=Le.join(n,l.source)),s!=null&&(l.source=Le.relative(s,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var f=l.source;f!=null&&!o.has(f)&&o.add(f);var c=l.name;c!=null&&!a.has(c)&&a.add(c)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=Le.join(n,l)),s!=null&&(l=Le.relative(s,l)),this.setSourceContent(l,u))},this)};Rt.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}))}};Rt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",l,u,f,c,d=this._mappings.toArray(),p=0,m=d.length;p<m;p++){if(u=d[p],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(p>0){if(!Le.compareByGeneratedPositionsInflated(u,d[p-1]))continue;l+=","}l+=Fs.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(c=this._sources.indexOf(u.source),l+=Fs.encode(c-o),o=c,l+=Fs.encode(u.originalLine-1-i),i=u.originalLine-1,l+=Fs.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),l+=Fs.encode(f-s),s=f)),a+=l}return a};Rt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Le.relative(r,n));var i=Le.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Rt.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};Rt.prototype.toString=function(){return JSON.stringify(this.toJSON())};jb.SourceMapGenerator=Rt});var Ub=R(wn=>{wn.GREATEST_LOWER_BOUND=1;wn.LEAST_UPPER_BOUND=2;function bh(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?bh(o,e,r,n,i,s):s==wn.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?bh(t,o,r,n,i,s):s==wn.LEAST_UPPER_BOUND?o:t<0?-1:t}wn.search=function(e,r,n,i){if(r.length===0)return-1;var s=bh(-1,r.length,e,r,n,i||wn.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var Hb=R(qb=>{function _h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function BR(t,e){return Math.round(t+Math.random()*(e-t))}function vh(t,e,r,n){if(r<n){var i=BR(r,n),s=r-1;_h(t,i,n);for(var o=t[n],a=r;a<n;a++)e(t[a],o)<=0&&(s+=1,_h(t,s,a));_h(t,s+1,a);var l=s+1;vh(t,e,r,l-1),vh(t,e,l+1,n)}}qb.quickSort=function(t,e){vh(t,e,0,t.length-1)}});var Wb=R(pl=>{var W=hi(),Eh=Ub(),di=yh().ArraySet,LR=ph(),Qs=Hb().quickSort;function me(t,e){var r=t;return typeof t=="string"&&(r=W.parseSourceMapInput(t)),r.sections!=null?new jt(r,e):new qe(r,e)}me.fromSourceMap=function(t,e){return qe.fromSourceMap(t,e)};me.prototype._version=3;me.prototype.__generatedMappings=null;Object.defineProperty(me.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});me.prototype.__originalMappings=null;Object.defineProperty(me.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});me.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};me.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};me.GENERATED_ORDER=1;me.ORIGINAL_ORDER=2;me.GREATEST_LOWER_BOUND=1;me.LEAST_UPPER_BOUND=2;me.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||me.GENERATED_ORDER,o;switch(s){case me.GENERATED_ORDER:o=this._generatedMappings;break;case me.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=W.computeSourceURL(a,u,this._sourceMapURL),{source:u,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)};me.prototype.allGeneratedPositionsFor=function(e){var r=W.getArg(e,"line"),n={source:W.getArg(e,"source"),originalLine:r,originalColumn:W.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",W.compareByOriginalPositions,Eh.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:W.getArg(o,"generatedLine",null),column:W.getArg(o,"generatedColumn",null),lastColumn:W.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var l=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==l;)i.push({line:W.getArg(o,"generatedLine",null),column:W.getArg(o,"generatedColumn",null),lastColumn:W.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};pl.SourceMapConsumer=me;function qe(t,e){var r=t;typeof t=="string"&&(r=W.parseSourceMapInput(t));var n=W.getArg(r,"version"),i=W.getArg(r,"sources"),s=W.getArg(r,"names",[]),o=W.getArg(r,"sourceRoot",null),a=W.getArg(r,"sourcesContent",null),l=W.getArg(r,"mappings"),u=W.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=W.normalize(o)),i=i.map(String).map(W.normalize).map(function(f){return o&&W.isAbsolute(o)&&W.isAbsolute(f)?W.relative(o,f):f}),this._names=di.fromArray(s.map(String),!0),this._sources=di.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return W.computeSourceURL(o,f,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}qe.prototype=Object.create(me.prototype);qe.prototype.consumer=me;qe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=W.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};qe.fromSourceMap=function(e,r){var n=Object.create(qe.prototype),i=n._names=di.fromArray(e._names.toArray(),!0),s=n._sources=di.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(p){return W.computeSourceURL(n.sourceRoot,p,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,f=o.length;u<f;u++){var c=o[u],d=new $b;d.generatedLine=c.generatedLine,d.generatedColumn=c.generatedColumn,c.source&&(d.source=s.indexOf(c.source),d.originalLine=c.originalLine,d.originalColumn=c.originalColumn,c.name&&(d.name=i.indexOf(c.name)),l.push(d)),a.push(d)}return Qs(n.__originalMappings,W.compareByOriginalPositions),n};qe.prototype._version=3;Object.defineProperty(qe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function $b(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}qe.prototype._parseMappings=function(e,r){for(var n=1,i=0,s=0,o=0,a=0,l=0,u=e.length,f=0,c={},d={},p=[],m=[],g,A,y,_,b;f<u;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(g=new $b,g.generatedLine=n,_=f;_<u&&!this._charIsMappingSeparator(e,_);_++);if(A=e.slice(f,_),y=c[A],y)f+=A.length;else{for(y=[];f<_;)LR.decode(e,f,d),b=d.value,f=d.rest,y.push(b);if(y.length===2)throw new Error("Found a source, but no line and column");if(y.length===3)throw new Error("Found a source and line, but no column");c[A]=y}g.generatedColumn=i+y[0],i=g.generatedColumn,y.length>1&&(g.source=a+y[1],a+=y[1],g.originalLine=s+y[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+y[3],o=g.originalColumn,y.length>4&&(g.name=l+y[4],l+=y[4])),m.push(g),typeof g.originalLine=="number"&&p.push(g)}Qs(m,W.compareByGeneratedPositionsDeflated),this.__generatedMappings=m,Qs(p,W.compareByOriginalPositions),this.__originalMappings=p};qe.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 Eh.search(e,r,s,o)};qe.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}};qe.prototype.originalPositionFor=function(e){var r={generatedLine:W.getArg(e,"line"),generatedColumn:W.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",W.compareByGeneratedPositionsDeflated,W.getArg(e,"bias",me.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=W.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=W.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=W.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:W.getArg(i,"originalLine",null),column:W.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};qe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};qe.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=W.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=W.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.')};qe.prototype.generatedPositionFor=function(e){var r=W.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:W.getArg(e,"line"),originalColumn:W.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",W.compareByOriginalPositions,W.getArg(e,"bias",me.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:W.getArg(s,"generatedLine",null),column:W.getArg(s,"generatedColumn",null),lastColumn:W.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};pl.BasicSourceMapConsumer=qe;function jt(t,e){var r=t;typeof t=="string"&&(r=W.parseSourceMapInput(t));var n=W.getArg(r,"version"),i=W.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new di,this._names=new di;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=W.getArg(o,"offset"),l=W.getArg(a,"line"),u=W.getArg(a,"column");if(l<s.line||l===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new me(W.getArg(o,"map"),e)}})}jt.prototype=Object.create(me.prototype);jt.prototype.constructor=me;jt.prototype._version=3;Object.defineProperty(jt.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}});jt.prototype.originalPositionFor=function(e){var r={generatedLine:W.getArg(e,"line"),generatedColumn:W.getArg(e,"column")},n=Eh.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}};jt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};jt.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.')};jt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(W.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}};jt.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=W.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));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:u};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Qs(this.__generatedMappings,W.compareByGeneratedPositionsDeflated),Qs(this.__originalMappings,W.compareByOriginalPositions)};pl.IndexedSourceMapConsumer=jt});var Gb=R(Kb=>{var DR=wh().SourceMapGenerator,ml=hi(),PR=/(\r?\n)/,RR=10,pi="$$$isSourceNode$$$";function bt(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[pi]=!0,n!=null&&this.add(n)}bt.fromStringWithSourceMap=function(e,r,n){var i=new bt,s=e.split(PR),o=0,a=function(){var d=m(),p=m()||"";return d+p;function m(){return o<s.length?s[o++]:void 0}},l=1,u=0,f=null;return r.eachMapping(function(d){if(f!==null)if(l<d.generatedLine)c(f,a()),l++,u=0;else{var p=s[o]||"",m=p.substr(0,d.generatedColumn-u);s[o]=p.substr(d.generatedColumn-u),u=d.generatedColumn,c(f,m),f=d;return}for(;l<d.generatedLine;)i.add(a()),l++;if(u<d.generatedColumn){var p=s[o]||"";i.add(p.substr(0,d.generatedColumn)),s[o]=p.substr(d.generatedColumn),u=d.generatedColumn}f=d},this),o<s.length&&(f&&c(f,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var p=r.sourceContentFor(d);p!=null&&(n!=null&&(d=ml.join(n,d)),i.setSourceContent(d,p))}),i;function c(d,p){if(d===null||d.source===void 0)i.add(p);else{var m=n?ml.join(n,d.source):d.source;i.add(new bt(d.originalLine,d.originalColumn,m,p,d.name))}}};bt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[pi]||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};bt.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[pi]||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};bt.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[pi]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};bt.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};bt.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[pi]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};bt.prototype.setSourceContent=function(e,r){this.sourceContents[ml.toSetString(e)]=r};bt.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][pi]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(ml.fromSetString(i[r]),this.sourceContents[i[r]])};bt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};bt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new DR(e),i=!1,s=null,o=null,a=null,l=null;return this.walk(function(u,f){r.code+=u,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 c=0,d=u.length;c<d;c++)u.charCodeAt(c)===RR?(r.line++,r.column=0,c+1===d?(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(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}};Kb.SourceNode=bt});var Jb=R(gl=>{gl.SourceMapGenerator=wh().SourceMapGenerator;gl.SourceMapConsumer=Wb().SourceMapConsumer;gl.SourceNode=Gb().SourceNode});var Xb=R((Al,zb)=>{"use strict";Al.__esModule=!0;var xh=rt(),bn=void 0;try{(typeof define!="function"||!define.amd)&&(Vb=Jb(),bn=Vb.SourceNode)}catch{}var Vb;bn||(bn=function(t,e,r,n){this.src="",n&&this.add(n)},bn.prototype={add:function(e){xh.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){xh.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Ch(t,e,r){if(xh.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 Yb(t){this.srcFile=t,this.source=[]}Yb.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,`
|
|
145
|
+
`])}),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 bn(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 bn?e:(e=Ch(e,this,r),new bn(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+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var o=Ch(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(Ch(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Al.default=Yb;zb.exports=Al.default});var n_=R((yl,r_)=>{"use strict";yl.__esModule=!0;function t_(t){return t&&t.__esModule?t:{default:t}}var Zb=Xa(),NR=wt(),Sh=t_(NR),TR=rt(),FR=Xb(),e_=t_(FR);function mi(t){this.value=t}function gi(){}gi.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Zb.COMPILER_REVISION,r=Zb.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return TR.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,",",JSON.stringify(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,u=void 0;for(l=0,u=s.length;l<u;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 Sh.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(),`;
|
|
146
|
+
`]),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) {
|
|
147
|
+
`),this.decorators.push(`}
|
|
148
|
+
`),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(i);if(this.isChild)return f;var c={compiler:this.compilerInfo(),main:f};this.decorators&&(c.main_d=this.decorators,c.useDecorators=!0);var d=this.context,p=d.programs,m=d.decorators;for(l=0,u=p.length;l<u;l++)c[l]=p[l],m[l]&&(c[l+"_d"]=m[l],c.useDecorators=!0);return this.environment.usePartial&&(c.usePartial=!0),this.options.data&&(c.useData=!0),this.useDepths&&(c.useDepths=!0),this.useBlockParams&&(c.useBlockParams=!0),this.options.compat&&(c.compat=!0),i?c.compilerOptions=this.options:(c.compiler=JSON.stringify(c.compiler),this.source.currentLocation={start:{line:1,column:0}},c=this.objectLiteral(c),r.srcName?(c=c.toStringWithSourceMap({file:r.destName}),c.map=c.map&&c.map.toString()):c=c.toString()),c},preamble:function(){this.lastContext=0,this.source=new e_.default(this.options.srcName),this.decorators=new e_.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 u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++s+"="+l,u.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(","),`) {
|
|
149
|
+
`,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?"":`;
|
|
150
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
151
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
152
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
153
|
+
return parent[propertyName];
|
|
154
|
+
}
|
|
155
|
+
return undefined
|
|
156
|
+
}
|
|
157
|
+
`.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(QR(this.options.strict&&s,this,r,n,e));return}for(var a=r.length,l=function(f){o.replaceStack(function(c){var d=o.nameLookup(c,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",c]})},u=n;u<a;u++)l(u)},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=JSON.stringify(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?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:gi,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 u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=s.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=s.decorators,this.context.environments[u]=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 mi||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new mi(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 Sh.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof mi)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 mi)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 mi)return n.value;if(!r){if(!this.stackSlot)throw new Sh.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 mi?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,u=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(),c=this.popStack();(c||f)&&(i.fn=c||"container.noop",i.inverse=f||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(o[d]=this.popStack(),s[d]=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=JSON.stringify(this.source.currentLocation),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=gi.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();gi.isValidJavaScriptVariableName=function(t){return!gi.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function QR(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]),", ",JSON.stringify(e.source.currentLocation)," )"]:s}yl.default=gi;r_.exports=yl.default});var o_=R((wl,s_)=>{"use strict";wl.__esModule=!0;function Ms(t){return t&&t.__esModule?t:{default:t}}var MR=lb(),jR=Ms(MR),UR=th(),qR=Ms(UR),kh=bb(),Ih=Cb(),HR=n_(),$R=Ms(HR),WR=cl(),KR=Ms(WR),GR=zf(),JR=Ms(GR),VR=jR.default.create;function i_(){var t=VR();return t.compile=function(e,r){return Ih.compile(e,r,t)},t.precompile=function(e,r){return Ih.precompile(e,r,t)},t.AST=qR.default,t.Compiler=Ih.Compiler,t.JavaScriptCompiler=$R.default,t.Parser=kh.parser,t.parse=kh.parse,t.parseWithoutProcessing=kh.parseWithoutProcessing,t}var Ai=i_();Ai.create=i_;JR.default(Ai);Ai.Visitor=KR.default;Ai.default=Ai;wl.default=Ai;s_.exports=wl.default});var a_=R(bl=>{"use strict";bl.__esModule=!0;bl.print=ZR;bl.PrintVisitor=Ce;function YR(t){return t&&t.__esModule?t:{default:t}}var zR=cl(),XR=YR(zR);function ZR(t){return new Ce().accept(t)}function Ce(){this.padding=0}Ce.prototype=new XR.default;Ce.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
158
|
+
`,e};Ce.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};Ce.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Ce.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Ce.prototype.BlockStatement=Ce.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};Ce.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+" }}")};Ce.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+" }}")};Ce.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Ce.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Ce.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};Ce.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Ce.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Ce.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Ce.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Ce.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ce.prototype.NullLiteral=function(){return"NULL"};Ce.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(", ")+"}"};Ce.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var f_=R((WQ,u_)=>{var _l=o_().default,c_=a_();_l.PrintVisitor=c_.PrintVisitor;_l.print=c_.print;u_.exports=_l;function l_(t,e){var r=le("fs"),n=r.readFileSync(e,"utf8");t.exports=_l.compile(n)}typeof le<"u"&&le.extensions&&(le.extensions[".handlebars"]=l_,le.extensions[".hbs"]=l_)});import{readFile as m_,writeFile as d_,access as d4,mkdir as p4}from"node:fs/promises";import{resolve as Yt,relative as Bh}from"node:path";import{pathToFileURL as g_}from"node:url";function ad(t){return typeof t>"u"||t===null}function E_(t){return typeof t=="object"&&t!==null}function C_(t){return Array.isArray(t)?t:ad(t)?[]:[t]}function x_(t,e){var r,n,i,s;if(e)for(s=Object.keys(e),r=0,n=s.length;r<n;r+=1)i=s[r],t[i]=e[i];return t}function S_(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function k_(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var I_=ad,O_=E_,B_=C_,L_=S_,D_=k_,P_=x_,Re={isNothing:I_,isObject:O_,toArray:B_,repeat:L_,isNegativeZero:D_,extend:P_};function ld(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
159
|
+
|
|
160
|
+
`+t.mark.snippet),n+" "+r):n}function _i(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ld(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_i.prototype=Object.create(Error.prototype);_i.prototype.constructor=_i;_i.prototype.toString=function(e){return this.name+": "+ld(this,e)};var Ve=_i;function Il(t,e,r,n,i){var s="",o="",a=Math.floor(i/2)-1;return n-e>a&&(s=" ... ",e=n-a+s.length),r-n>a&&(o=" ...",r=n+a-o.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+s.length}}function Ol(t,e){return Re.repeat(" ",e-t.length)+t}function R_(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,o=-1;s=r.exec(t.buffer);)i.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var a="",l,u,f=Math.min(t.line+e.linesAfter,i.length).toString().length,c=e.maxLength-(e.indent+f+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)u=Il(t.buffer,n[o-l],i[o-l],t.position-(n[o]-n[o-l]),c),a=Re.repeat(" ",e.indent)+Ol((t.line-l+1).toString(),f)+" | "+u.str+`
|
|
161
|
+
`+a;for(u=Il(t.buffer,n[o],i[o],t.position,c),a+=Re.repeat(" ",e.indent)+Ol((t.line+1).toString(),f)+" | "+u.str+`
|
|
162
|
+
`,a+=Re.repeat("-",e.indent+f+3+u.pos)+`^
|
|
163
|
+
`,l=1;l<=e.linesAfter&&!(o+l>=i.length);l++)u=Il(t.buffer,n[o+l],i[o+l],t.position-(n[o]-n[o+l]),c),a+=Re.repeat(" ",e.indent)+Ol((t.line+l+1).toString(),f)+" | "+u.str+`
|
|
164
|
+
`;return a.replace(/\n$/,"")}var N_=R_,T_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],F_=["scalar","sequence","mapping"];function Q_(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function M_(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(T_.indexOf(r)===-1)throw new Ve('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Q_(e.styleAliases||null),F_.indexOf(this.kind)===-1)throw new Ve('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var je=M_;function Kh(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=o)}),r[i]=n}),r}function j_(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function Ll(t){return this.extend(t)}Ll.prototype.extend=function(e){var r=[],n=[];if(e instanceof je)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Ve("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof je))throw new Ve("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Ve("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Ve("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof je))throw new Ve("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ll.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Kh(i,"implicit"),i.compiledExplicit=Kh(i,"explicit"),i.compiledTypeMap=j_(i.compiledImplicit,i.compiledExplicit),i};var cd=Ll,ud=new je("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),fd=new je("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),hd=new je("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),dd=new cd({explicit:[ud,fd,hd]});function U_(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function q_(){return null}function H_(t){return t===null}var pd=new je("tag:yaml.org,2002:null",{kind:"scalar",resolve:U_,construct:q_,predicate:H_,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function $_(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function W_(t){return t==="true"||t==="True"||t==="TRUE"}function K_(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var md=new je("tag:yaml.org,2002:bool",{kind:"scalar",resolve:$_,construct:W_,predicate:K_,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function G_(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function J_(t){return 48<=t&&t<=55}function V_(t){return 48<=t&&t<=57}function Y_(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!G_(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!J_(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!V_(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function z_(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function X_(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Re.isNegativeZero(t)}var gd=new je("tag:yaml.org,2002:int",{kind:"scalar",resolve:Y_,construct:z_,predicate:X_,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Z_=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ev(t){return!(t===null||!Z_.test(t)||t[t.length-1]==="_")}function tv(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var rv=/^[-+]?[0-9]+e/;function nv(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Re.isNegativeZero(t))return"-0.0";return r=t.toString(10),rv.test(r)?r.replace("e",".e"):r}function iv(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Re.isNegativeZero(t))}var Ad=new je("tag:yaml.org,2002:float",{kind:"scalar",resolve:ev,construct:tv,predicate:iv,represent:nv,defaultStyle:"lowercase"}),yd=dd.extend({implicit:[pd,md,gd,Ad]}),wd=yd,bd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_d=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 sv(t){return t===null?!1:bd.exec(t)!==null||_d.exec(t)!==null}function ov(t){var e,r,n,i,s,o,a,l=0,u=null,f,c,d;if(e=bd.exec(t),e===null&&(e=_d.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(f=+e[10],c=+(e[11]||0),u=(f*60+c)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,s,o,a,l)),u&&d.setTime(d.getTime()-u),d}function av(t){return t.toISOString()}var vd=new je("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:sv,construct:ov,instanceOf:Date,represent:av});function lv(t){return t==="<<"||t===null}var Ed=new je("tag:yaml.org,2002:merge",{kind:"scalar",resolve:lv}),Tl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
165
|
+
\r`;function cv(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=Tl;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function uv(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=Tl,o=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function fv(t){var e="",r=0,n,i,s=t.length,o=Tl;for(n=0;n<s;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function hv(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Cd=new je("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cv,construct:uv,predicate:hv,represent:fv}),dv=Object.prototype.hasOwnProperty,pv=Object.prototype.toString;function mv(t){if(t===null)return!0;var e=[],r,n,i,s,o,a=t;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],o=!1,pv.call(i)!=="[object Object]")return!1;for(s in i)if(dv.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function gv(t){return t!==null?t:[]}var xd=new je("tag:yaml.org,2002:omap",{kind:"sequence",resolve:mv,construct:gv}),Av=Object.prototype.toString;function yv(t){if(t===null)return!0;var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],Av.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function wv(t){if(t===null)return[];var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}var Sd=new je("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yv,construct:wv}),bv=Object.prototype.hasOwnProperty;function _v(t){if(t===null)return!0;var e,r=t;for(e in r)if(bv.call(r,e)&&r[e]!==null)return!1;return!0}function vv(t){return t!==null?t:{}}var kd=new je("tag:yaml.org,2002:set",{kind:"mapping",resolve:_v,construct:vv}),Fl=wd.extend({implicit:[vd,Ed],explicit:[Cd,xd,Sd,kd]}),mr=Object.prototype.hasOwnProperty,qs=1,Id=2,Od=3,Hs=4,Bl=1,Ev=2,Gh=3,Cv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xv=/[\x85\u2028\u2029]/,Sv=/[,\[\]\{\}]/,Bd=/^(?:!|!!|![a-z\-]+!)$/i,Ld=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jh(t){return Object.prototype.toString.call(t)}function Ut(t){return t===10||t===13}function Fr(t){return t===9||t===32}function ot(t){return t===9||t===32||t===10||t===13}function Cn(t){return t===44||t===91||t===93||t===123||t===125}function kv(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Iv(t){return t===120?2:t===117?4:t===85?8:0}function Ov(t){return 48<=t&&t<=57?t-48:-1}function Vh(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
166
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function Bv(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function Dd(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var Pd=new Array(256),Rd=new Array(256);for(Tr=0;Tr<256;Tr++)Pd[Tr]=Vh(Tr)?1:0,Rd[Tr]=Vh(Tr);var Tr;function Lv(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Fl,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Nd(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=N_(r),new Ve(e,r)}function z(t,e){throw Nd(t,e)}function $s(t,e){t.onWarning&&t.onWarning.call(null,Nd(t,e))}var Yh={YAML:function(e,r,n){var i,s,o;e.version!==null&&z(e,"duplication of %YAML directive"),n.length!==1&&z(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&z(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&z(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&$s(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&z(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],Bd.test(i)||z(e,"ill-formed tag handle (first argument) of the TAG directive"),mr.call(e.tagMap,i)&&z(e,'there is a previously declared suffix for "'+i+'" tag handle'),Ld.test(s)||z(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{z(e,"tag prefix is malformed: "+s)}e.tagMap[i]=s}};function pr(t,e,r,n){var i,s,o,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||z(t,"expected valid JSON character");else Cv.test(a)&&z(t,"the stream contains non-printable characters");t.result+=a}}function zh(t,e,r,n){var i,s,o,a;for(Re.isObject(r)||z(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)s=i[o],mr.call(e,s)||(Dd(e,s,r[s]),n[s]=!0)}function xn(t,e,r,n,i,s,o,a,l){var u,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,f=i.length;u<f;u+=1)Array.isArray(i[u])&&z(t,"nested arrays are not supported inside keys"),typeof i=="object"&&Jh(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&Jh(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,f=s.length;u<f;u+=1)zh(t,e,s[u],r);else zh(t,e,s,r);else!t.json&&!mr.call(r,i)&&mr.call(e,i)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,z(t,"duplicated mapping key")),Dd(e,i,s),delete r[i];return e}function Ql(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):z(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Ie(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Fr(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Ut(i))for(Ql(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&$s(t,"deficient indentation"),n}function Gs(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||ot(r)))}function Ml(t,e){e===1?t.result+=" ":e>1&&(t.result+=Re.repeat(`
|
|
167
|
+
`,e-1))}function Dv(t,e,r){var n,i,s,o,a,l,u,f,c=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),ot(p)||Cn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),ot(i)||r&&Cn(i)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),ot(i)||r&&Cn(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),ot(n))break}else{if(t.position===t.lineStart&&Gs(t)||r&&Cn(p))break;if(Ut(p))if(l=t.line,u=t.lineStart,f=t.lineIndent,Ie(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=u,t.lineIndent=f;break}}a&&(pr(t,s,o,!1),Ml(t,t.line-l),s=o=t.position,a=!1),Fr(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return pr(t,s,o,!1),t.result?!0:(t.kind=c,t.result=d,!1)}function Pv(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(pr(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Ut(r)?(pr(t,n,i,!0),Ml(t,Ie(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Gs(t)?z(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);z(t,"unexpected end of the stream within a single quoted scalar")}function Rv(t,e){var r,n,i,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return pr(t,r,t.position,!0),t.position++,!0;if(a===92){if(pr(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Ut(a))Ie(t,!1,e);else if(a<256&&Pd[a])t.result+=Rd[a],t.position++;else if((o=Iv(a))>0){for(i=o,s=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=kv(a))>=0?s=(s<<4)+o:z(t,"expected hexadecimal character");t.result+=Bv(s),t.position++}else z(t,"unknown escape sequence");r=n=t.position}else Ut(a)?(pr(t,r,n,!0),Ml(t,Ie(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Gs(t)?z(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}z(t,"unexpected end of the stream within a double quoted scalar")}function Nv(t,e){var r=!0,n,i,s,o=t.tag,a,l=t.anchor,u,f,c,d,p,m=Object.create(null),g,A,y,_;if(_=t.input.charCodeAt(t.position),_===91)f=93,p=!1,a=[];else if(_===123)f=125,p=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),_=t.input.charCodeAt(++t.position);_!==0;){if(Ie(t,!0,e),_=t.input.charCodeAt(t.position),_===f)return t.position++,t.tag=o,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=a,!0;r?_===44&&z(t,"expected the node content, but found ','"):z(t,"missed comma between flow collection entries"),A=g=y=null,c=d=!1,_===63&&(u=t.input.charCodeAt(t.position+1),ot(u)&&(c=d=!0,t.position++,Ie(t,!0,e))),n=t.line,i=t.lineStart,s=t.position,Sn(t,e,qs,!1,!0),A=t.tag,g=t.result,Ie(t,!0,e),_=t.input.charCodeAt(t.position),(d||t.line===n)&&_===58&&(c=!0,_=t.input.charCodeAt(++t.position),Ie(t,!0,e),Sn(t,e,qs,!1,!0),y=t.result),p?xn(t,a,m,A,g,y,n,i,s):c?a.push(xn(t,null,m,A,g,y,n,i,s)):a.push(g),Ie(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(r=!0,_=t.input.charCodeAt(++t.position)):r=!1}z(t,"unexpected end of the stream within a flow collection")}function Tv(t,e){var r,n,i=Bl,s=!1,o=!1,a=e,l=0,u=!1,f,c;if(c=t.input.charCodeAt(t.position),c===124)n=!1;else if(c===62)n=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)Bl===i?i=c===43?Gh:Ev:z(t,"repeat of a chomping mode identifier");else if((f=Ov(c))>=0)f===0?z(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?z(t,"repeat of an indentation width identifier"):(a=e+f-1,o=!0);else break;if(Fr(c)){do c=t.input.charCodeAt(++t.position);while(Fr(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!Ut(c)&&c!==0)}for(;c!==0;){for(Ql(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&c===32;)t.lineIndent++,c=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Ut(c)){l++;continue}if(t.lineIndent<a){i===Gh?t.result+=Re.repeat(`
|
|
168
|
+
`,s?1+l:l):i===Bl&&s&&(t.result+=`
|
|
169
|
+
`);break}for(n?Fr(c)?(u=!0,t.result+=Re.repeat(`
|
|
170
|
+
`,s?1+l:l)):u?(u=!1,t.result+=Re.repeat(`
|
|
171
|
+
`,l+1)):l===0?s&&(t.result+=" "):t.result+=Re.repeat(`
|
|
172
|
+
`,l):t.result+=Re.repeat(`
|
|
173
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=t.position;!Ut(c)&&c!==0;)c=t.input.charCodeAt(++t.position);pr(t,r,t.position,!1)}return!0}function Xh(t,e){var r,n=t.tag,i=t.anchor,s=[],o,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,z(t,"tab characters must not be used in indentation")),!(l!==45||(o=t.input.charCodeAt(t.position+1),!ot(o))));){if(a=!0,t.position++,Ie(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Sn(t,e,Od,!1,!0),s.push(t.result),Ie(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)z(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function Fv(t,e,r){var n,i,s,o,a,l,u=t.tag,f=t.anchor,c={},d=Object.create(null),p=null,m=null,g=null,A=!1,y=!1,_;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),_=t.input.charCodeAt(t.position);_!==0;){if(!A&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,z(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),s=t.line,(_===63||_===58)&&ot(n))_===63?(A&&(xn(t,c,d,p,m,null,o,a,l),p=m=g=null),y=!0,A=!0,i=!0):A?(A=!1,i=!0):z(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=n;else{if(o=t.line,a=t.lineStart,l=t.position,!Sn(t,r,Id,!1,!0))break;if(t.line===s){for(_=t.input.charCodeAt(t.position);Fr(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),ot(_)||z(t,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(xn(t,c,d,p,m,null,o,a,l),p=m=g=null),y=!0,A=!1,i=!1,p=t.tag,m=t.result;else if(y)z(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=f,!0}else if(y)z(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=f,!0}if((t.line===s||t.lineIndent>e)&&(A&&(o=t.line,a=t.lineStart,l=t.position),Sn(t,e,Hs,!0,i)&&(A?m=t.result:g=t.result),A||(xn(t,c,d,p,m,g,o,a,l),p=m=g=null),Ie(t,!0,-1),_=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&_!==0)z(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return A&&xn(t,c,d,p,m,null,o,a,l),y&&(t.tag=u,t.anchor=f,t.kind="mapping",t.result=c),y}function Qv(t){var e,r=!1,n=!1,i,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&z(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):z(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ot(o);)o===33&&(n?z(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),Bd.test(i)||z(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),Sv.test(s)&&z(t,"tag suffix cannot contain flow indicator characters")}s&&!Ld.test(s)&&z(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{z(t,"tag name is malformed: "+s)}return r?t.tag=s:mr.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:z(t,'undeclared tag handle "'+i+'"'),!0}function Mv(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&z(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!ot(r)&&!Cn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&z(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function jv(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!ot(n)&&!Cn(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&z(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),mr.call(t.anchorMap,r)||z(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Ie(t,!0,-1),!0}function Sn(t,e,r,n,i){var s,o,a,l=1,u=!1,f=!1,c,d,p,m,g,A;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=Hs===r||Od===r,n&&Ie(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Qv(t)||Mv(t);)Ie(t,!0,-1)?(u=!0,a=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||Hs===r)&&(qs===r||Id===r?g=e:g=e+1,A=t.position-t.lineStart,l===1?a&&(Xh(t,A)||Fv(t,A,g))||Nv(t,g)?f=!0:(o&&Tv(t,g)||Pv(t,g)||Rv(t,g)?f=!0:jv(t)?(f=!0,(t.tag!==null||t.anchor!==null)&&z(t,"alias node should not have any properties")):Dv(t,g,qs===r)&&(f=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(f=a&&Xh(t,A))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&z(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),c=0,d=t.implicitTypes.length;c<d;c+=1)if(m=t.implicitTypes[c],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(mr.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],c=0,d=p.length;c<d;c+=1)if(t.tag.slice(0,p[c].tag.length)===p[c].tag){m=p[c];break}m||z(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&z(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):z(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}function Uv(t){var e=t.position,r,n,i,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Ie(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!ot(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&z(t,"directive name must not be less than one character in length");o!==0;){for(;Fr(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Ut(o));break}if(Ut(o))break;for(r=t.position;o!==0&&!ot(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&Ql(t),mr.call(Yh,n)?Yh[n](t,n,i):$s(t,'unknown document directive "'+n+'"')}if(Ie(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ie(t,!0,-1)):s&&z(t,"directives end mark is expected"),Sn(t,t.lineIndent-1,Hs,!1,!0),Ie(t,!0,-1),t.checkLineBreaks&&xv.test(t.input.slice(e,t.position))&&$s(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Gs(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ie(t,!0,-1));return}if(t.position<t.length-1)z(t,"end of the stream or a document separator is expected");else return}function Td(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
174
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Lv(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Uv(r);return r.documents}function qv(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Td(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function Hv(t,e){var r=Td(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ve("expected a single document in the stream, but found more")}}var $v=qv,Wv=Hv,Fd={loadAll:$v,load:Wv},Qd=Object.prototype.toString,Md=Object.prototype.hasOwnProperty,jl=65279,Kv=9,vi=10,Gv=13,Jv=32,Vv=33,Yv=34,Dl=35,zv=37,Xv=38,Zv=39,e2=42,jd=44,t2=45,Ws=58,r2=61,n2=62,i2=63,s2=64,Ud=91,qd=93,o2=96,Hd=123,a2=124,$d=125,He={};He[0]="\\0";He[7]="\\a";He[8]="\\b";He[9]="\\t";He[10]="\\n";He[11]="\\v";He[12]="\\f";He[13]="\\r";He[27]="\\e";He[34]='\\"';He[92]="\\\\";He[133]="\\N";He[160]="\\_";He[8232]="\\L";He[8233]="\\P";var l2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],c2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function u2(t,e){var r,n,i,s,o,a,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,s=n.length;i<s;i+=1)o=n[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&Md.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}function f2(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new Ve("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Re.repeat("0",n-e.length)+e}var h2=1,Ei=2;function d2(t){this.schema=t.schema||Fl,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Re.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=u2(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?Ei:h2,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Zh(t,e){for(var r=Re.repeat(" ",e),n=0,i=-1,s="",o,a=t.length;n<a;)i=t.indexOf(`
|
|
175
|
+
`,n),i===-1?(o=t.slice(n),n=a):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
|
|
176
|
+
`&&(s+=r),s+=o;return s}function Pl(t,e){return`
|
|
177
|
+
`+Re.repeat(" ",t.indent*e)}function p2(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function Ks(t){return t===Jv||t===Kv}function Ci(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==jl||65536<=t&&t<=1114111}function ed(t){return Ci(t)&&t!==jl&&t!==Gv&&t!==vi}function td(t,e,r){var n=ed(t),i=n&&!Ks(t);return(r?n:n&&t!==jd&&t!==Ud&&t!==qd&&t!==Hd&&t!==$d)&&t!==Dl&&!(e===Ws&&!i)||ed(e)&&!Ks(e)&&t===Dl||e===Ws&&i}function m2(t){return Ci(t)&&t!==jl&&!Ks(t)&&t!==t2&&t!==i2&&t!==Ws&&t!==jd&&t!==Ud&&t!==qd&&t!==Hd&&t!==$d&&t!==Dl&&t!==Xv&&t!==e2&&t!==Vv&&t!==a2&&t!==r2&&t!==n2&&t!==Zv&&t!==Yv&&t!==zv&&t!==s2&&t!==o2}function g2(t){return!Ks(t)&&t!==Ws}function bi(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function Wd(t){var e=/^\n* /;return e.test(t)}var Kd=1,Rl=2,Gd=3,Jd=4,En=5;function A2(t,e,r,n,i,s,o,a){var l,u=0,f=null,c=!1,d=!1,p=n!==-1,m=-1,g=m2(bi(t,0))&&g2(bi(t,t.length-1));if(e||o)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=bi(t,l),!Ci(u))return En;g=g&&td(u,f,a),f=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=bi(t,l),u===vi)c=!0,p&&(d=d||l-m-1>n&&t[m+1]!==" ",m=l);else if(!Ci(u))return En;g=g&&td(u,f,a),f=u}d=d||p&&l-m-1>n&&t[m+1]!==" "}return!c&&!d?g&&!o&&!i(t)?Kd:s===Ei?En:Rl:r>9&&Wd(t)?En:o?s===Ei?En:Rl:d?Jd:Gd}function y2(t,e,r,n,i){t.dump=(function(){if(e.length===0)return t.quotingType===Ei?'""':"''";if(!t.noCompatMode&&(l2.indexOf(e)!==-1||c2.test(e)))return t.quotingType===Ei?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),a=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return p2(t,u)}switch(A2(e,a,t.indent,o,l,t.quotingType,t.forceQuotes&&!n,i)){case Kd:return e;case Rl:return"'"+e.replace(/'/g,"''")+"'";case Gd:return"|"+rd(e,t.indent)+nd(Zh(e,s));case Jd:return">"+rd(e,t.indent)+nd(Zh(w2(e,o),s));case En:return'"'+b2(e)+'"';default:throw new Ve("impossible error: invalid scalar style")}})()}function rd(t,e){var r=Wd(t)?String(e):"",n=t[t.length-1]===`
|
|
178
|
+
`,i=n&&(t[t.length-2]===`
|
|
179
|
+
`||t===`
|
|
180
|
+
`),s=i?"+":n?"":"-";return r+s+`
|
|
181
|
+
`}function nd(t){return t[t.length-1]===`
|
|
182
|
+
`?t.slice(0,-1):t}function w2(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=t.indexOf(`
|
|
183
|
+
`);return u=u!==-1?u:t.length,r.lastIndex=u,id(t.slice(0,u),e)})(),i=t[0]===`
|
|
184
|
+
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",n+=a+(!i&&!s&&l!==""?`
|
|
185
|
+
`:"")+id(l,e),i=s}return n}function id(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,l="";n=r.exec(t);)a=n.index,a-i>e&&(s=o>i?o:a,l+=`
|
|
186
|
+
`+t.slice(i,s),i=s+1),o=a;return l+=`
|
|
187
|
+
`,t.length-i>e&&o>i?l+=t.slice(i,o)+`
|
|
188
|
+
`+t.slice(o+1):l+=t.slice(i),l.slice(1)}function b2(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=bi(t,i),n=He[r],!n&&Ci(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||f2(r);return e}function _2(t,e,r){var n="",i=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(Xt(t,e,a,!1,!1)||typeof a>"u"&&Xt(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function sd(t,e,r,n){var i="",s=t.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],t.replacer&&(l=t.replacer.call(r,String(o),l)),(Xt(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&Xt(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Pl(t,e)),t.dump&&vi===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function v2(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,l,u,f;for(o=0,a=s.length;o<a;o+=1)f="",n!==""&&(f+=", "),t.condenseFlow&&(f+='"'),l=s[o],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),Xt(t,e,l,!1,!1)&&(t.dump.length>1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Xt(t,e,u,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}function E2(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,l,u,f,c,d;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Ve("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)d="",(!n||i!=="")&&(d+=Pl(t,e)),u=o[a],f=r[u],t.replacer&&(f=t.replacer.call(r,u,f)),Xt(t,e+1,u,!0,!0,!0)&&(c=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,c&&(t.dump&&vi===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,c&&(d+=Pl(t,e)),Xt(t,e+1,f,!0,c)&&(t.dump&&vi===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=s,t.dump=i||"{}"}function od(t,e,r){var n,i,s,o,a,l;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,Qd.call(a.represent)==="[object Function]")n=a.represent(e,l);else if(Md.call(a.represent,l))n=a.represent[l](e,l);else throw new Ve("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Xt(t,e,r,n,i,s,o){t.tag=null,t.dump=r,od(t,r,!1)||od(t,r,!0);var a=Qd.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=a==="[object Object]"||a==="[object Array]",c,d;if(f&&(c=t.duplicates.indexOf(r),d=c!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(f&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(E2(t,e,t.dump,i),d&&(t.dump="&ref_"+c+t.dump)):(v2(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?sd(t,e-1,t.dump,i):sd(t,e,t.dump,i),d&&(t.dump="&ref_"+c+t.dump)):(_2(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&y2(t,t.dump,e,s,l);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ve("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function C2(t,e){var r=[],n=[],i,s;for(Nl(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function Nl(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)Nl(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)Nl(t[n[i]],e,r)}function x2(t,e){e=e||{};var r=new d2(e);r.noRefs||C2(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Xt(r,0,n,!0,!0)?r.dump+`
|
|
189
|
+
`:""}var S2=x2,k2={dump:S2};function Ul(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var I2=je,O2=cd,B2=dd,L2=yd,D2=wd,P2=Fl,R2=Fd.load,N2=Fd.loadAll,T2=k2.dump,F2=Ve,Q2={binary:Cd,float:Ad,map:hd,null:pd,pairs:Sd,set:kd,timestamp:vd,bool:md,int:gd,merge:Ed,omap:xd,seq:fd,str:ud},M2=Ul("safeLoad","load"),j2=Ul("safeLoadAll","loadAll"),U2=Ul("safeDump","dump"),Qr={Type:I2,Schema:O2,FAILSAFE_SCHEMA:B2,JSON_SCHEMA:L2,CORE_SCHEMA:D2,DEFAULT_SCHEMA:P2,load:R2,loadAll:N2,dump:T2,YAMLException:F2,types:Q2,safeLoad:M2,safeLoadAll:j2,safeDump:U2};var te=vn(zd(),1);import{stat as bE}from"fs";import{stat as _E,readdir as vE}from"fs/promises";import{EventEmitter as EE}from"events";import*as se from"path";import{stat as W2,lstat as Xd,readdir as K2,realpath as G2}from"node:fs/promises";import{Readable as J2}from"node:stream";import{resolve as Zd,relative as V2,join as Y2,sep as z2}from"node:path";var dt={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},Hl={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:dt.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(Hl);var np="READDIRP_RECURSIVE_ERROR",X2=new Set(["ENOENT","EPERM","EACCES","ELOOP",np]),ep=[dt.DIR_TYPE,dt.EVERYTHING_TYPE,dt.FILE_DIR_TYPE,dt.FILE_TYPE],Z2=new Set([dt.DIR_TYPE,dt.EVERYTHING_TYPE,dt.FILE_DIR_TYPE]),eE=new Set([dt.EVERYTHING_TYPE,dt.FILE_DIR_TYPE,dt.FILE_TYPE]),tE=t=>X2.has(t.code),rE=process.platform==="win32",tp=t=>!0,rp=t=>{if(t===void 0)return tp;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 tp},$l=class extends J2{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let r={...Hl,...e},{root:n,type:i}=r;this._fileFilter=rp(r.fileFilter),this._directoryFilter=rp(r.directoryFilter);let s=r.lstat?Xd:W2;rE?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=r.depth??Hl.depth,this._wantsDir=i?Z2.has(i):!1,this._wantsFile=i?eE.has(i):!1,this._wantsEverything=i===dt.EVERYTHING_TYPE,this._root=Zd(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 u=await this._getEntryType(l);u==="directory"&&this._directoryFilter(l)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(l.fullPath,s+1)),this._wantsDir&&(this.push(l),e--)):(u==="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 K2(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=Zd(Y2(r,i));n={path:V2(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){tE(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 G2(n),s=await Xd(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;if(n.startsWith(i)&&n.substr(o,1)===z2){let a=new Error(`Circular symlink detected: "${n}" points to "${i}"`);return a.code=np,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 ip(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=dt.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&&!ep.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${ep.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new $l(e)}import{watchFile as nE,unwatchFile as sp,watch as iE}from"fs";import{open as sE,stat as ap,lstat as oE,realpath as Wl}from"fs/promises";import*as Ae from"path";import{type as aE}from"os";var lE="data",Jl="end",lp="close",eo=()=>{};var to=process.platform,Vl=to==="win32",cE=to==="darwin",uE=to==="linux",fE=to==="freebsd",cp=aE()==="OS400",be={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Nt=be,hE="watch",dE={lstat:oE,stat:ap},Mr="listeners",Ys="errHandlers",kn="rawEmitters",pE=[Mr,Ys,kn],mE=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"]),gE=t=>mE.has(Ae.extname(t).slice(1).toLowerCase()),Gl=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},xi=(t,e,r)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(r)},AE=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},Si=(t,e,r)=>{let n=t[e];n instanceof Set?n.delete(r):n===r&&delete t[e]},up=t=>t instanceof Set?t.size===0:!t,zs=new Map;function op(t,e,r,n,i){let s=(o,a)=>{r(t),i(o,a,{watchedPath:t}),a&&t!==a&&Xs(Ae.resolve(t,a),Mr,Ae.join(t,a))};try{return iE(t,{persistent:e.persistent},s)}catch(o){n(o);return}}var Xs=(t,e,r,n,i)=>{let s=zs.get(t);s&&Gl(s[e],o=>{o(r,n,i)})},yE=(t,e,r,n)=>{let{listener:i,errHandler:s,rawEmitter:o}=n,a=zs.get(e),l;if(!r.persistent)return l=op(t,r,i,s,o),l?l.close.bind(l):void 0;if(a)xi(a,Mr,i),xi(a,Ys,s),xi(a,kn,o);else{if(l=op(t,r,Xs.bind(null,e,Mr),s,Xs.bind(null,e,kn)),!l)return;l.on(Nt.ERROR,async u=>{let f=Xs.bind(null,e,Ys);if(a&&(a.watcherUnusable=!0),Vl&&u.code==="EPERM")try{await(await sE(t,"r")).close(),f(u)}catch{}else f(u)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:l},zs.set(e,a)}return()=>{Si(a,Mr,i),Si(a,Ys,s),Si(a,kn,o),up(a.listeners)&&(a.watcher.close(),zs.delete(e),pE.forEach(AE(a)),a.watcher=void 0,Object.freeze(a))}},Kl=new Map,wE=(t,e,r,n)=>{let{listener:i,rawEmitter:s}=n,o=Kl.get(e),a=o&&o.options;return a&&(a.persistent<r.persistent||a.interval>r.interval)&&(sp(e),o=void 0),o?(xi(o,Mr,i),xi(o,kn,s)):(o={listeners:i,rawEmitters:s,options:r,watcher:nE(e,r,(l,u)=>{Gl(o.rawEmitters,c=>{c(Nt.CHANGE,e,{curr:l,prev:u})});let f=l.mtimeMs;(l.size!==u.size||f>u.mtimeMs||f===0)&&Gl(o.listeners,c=>c(t,l))})},Kl.set(e,o)),()=>{Si(o,Mr,i),Si(o,kn,s),up(o.listeners)&&(Kl.delete(e),sp(e),o.options=o.watcher=void 0,Object.freeze(o))}},Zs=class{constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let n=this.fsw.options,i=Ae.dirname(e),s=Ae.basename(e);this.fsw._getWatchedDir(i).add(s);let a=Ae.resolve(e),l={persistent:n.persistent};r||(r=eo);let u;if(n.usePolling){let f=n.interval!==n.binaryInterval;l.interval=f&&gE(s)?n.binaryInterval:n.interval,u=wE(e,a,l,{listener:r,rawEmitter:this.fsw._emitRaw})}else u=yE(e,a,l,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return u}_handleFile(e,r,n){if(this.fsw.closed)return;let i=Ae.dirname(e),s=Ae.basename(e),o=this.fsw._getWatchedDir(i),a=r;if(o.has(s))return;let l=async(f,c)=>{if(this.fsw._throttle(hE,e,5)){if(!c||c.mtimeMs===0)try{let d=await ap(e);if(this.fsw.closed)return;let p=d.atimeMs,m=d.mtimeMs;if((!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(Nt.CHANGE,e,d),(cE||uE||fE)&&a.ino!==d.ino){this.fsw._closeFile(f),a=d;let g=this._watchWithNodeFs(e,l);g&&this.fsw._addPathCloser(f,g)}else a=d}catch{this.fsw._remove(i,s)}else if(o.has(s)){let d=c.atimeMs,p=c.mtimeMs;(!d||d<=p||p!==a.mtimeMs)&&this.fsw._emit(Nt.CHANGE,e,c),a=c}}},u=this._watchWithNodeFs(e,l);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Nt.ADD,e,0))return;this.fsw._emit(Nt.ADD,e,r)}return u}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 Wl(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(Nt.CHANGE,n,e.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Nt.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=Ae.join(e,""),a=this.fsw._throttle("readdir",e,1e3),!a)return;let l=this.fsw._getWatchedDir(n.path),u=new Set,f=this.fsw._readdirp(e,{fileFilter:c=>n.filterPath(c),directoryFilter:c=>n.filterDir(c)});if(f)return f.on(lE,async c=>{if(this.fsw.closed){f=void 0;return}let d=c.path,p=Ae.join(e,d);if(u.add(d),!(c.stats.isSymbolicLink()&&await this._handleSymlink(c,e,p,d))){if(this.fsw.closed){f=void 0;return}(d===i||!i&&!l.has(d))&&(this.fsw._incrReadyCount(),p=Ae.join(s,Ae.relative(s,p)),this._addToNodeFs(p,r,n,o+1))}}).on(Nt.ERROR,this._boundHandleError),new Promise((c,d)=>{if(!f)return d();f.once(Jl,()=>{if(this.fsw.closed){f=void 0;return}let p=a?a.clear():!1;c(void 0),l.getChildren().filter(m=>m!==e&&!u.has(m)).forEach(m=>{this.fsw._remove(e,m)}),f=void 0,p&&this._handleRead(e,!1,n,i,s,o,a)})})}async _handleDir(e,r,n,i,s,o,a){let l=this.fsw._getWatchedDir(Ae.dirname(e)),u=l.has(Ae.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!u&&this.fsw._emit(Nt.ADD_DIR,e,r),l.add(Ae.basename(e)),this.fsw._getWatchedDir(e);let f,c,d=this.fsw.options.depth;if((d==null||i<=d)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,o,s,e,i,f),this.fsw.closed))return;c=this._watchWithNodeFs(e,(p,m)=>{m&&m.mtimeMs===0||this._handleRead(p,!1,o,s,e,i,f)})}return c}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 dE[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,l))return o(),!1;let u=this.fsw.options.followSymlinks,f;if(l.isDirectory()){let c=Ae.resolve(e),d=u?await Wl(e):e;if(this.fsw.closed||(f=await this._handleDir(a.watchPath,l,r,i,s,a,d),this.fsw.closed))return;c!==d&&d!==void 0&&this.fsw._symlinkPaths.set(c,d)}else if(l.isSymbolicLink()){let c=u?await Wl(e):e;if(this.fsw.closed)return;let d=Ae.dirname(a.watchPath);if(this.fsw._getWatchedDir(d).add(a.watchPath),this.fsw._emit(Nt.ADD,a.watchPath,l),f=await this._handleDir(d,l,r,i,e,a,c),this.fsw.closed)return;c!==void 0&&this.fsw._symlinkPaths.set(Ae.resolve(e),c)}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 Yl="/",CE="//",gp=".",xE="..",SE="string",kE=/\\/g,fp=/\/\//,IE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,OE=/^\.[/\\]/;function ro(t){return Array.isArray(t)?t:[t]}var zl=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);function BE(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=se.relative(t.path,e);return r?!r.startsWith("..")&&!se.isAbsolute(r):!1}return!1}:()=>!1}function LE(t){if(typeof t!="string")throw new Error("string expected");t=se.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 hp(t,e,r){let n=LE(e);for(let i=0;i<t.length;i++){let s=t[i];if(s(n,r))return!0}return!1}function DE(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let n=ro(t).map(i=>BE(i));return e==null?(i,s)=>hp(n,i,s):hp(n,e)}var dp=t=>{let e=ro(t).flat();if(!e.every(r=>typeof r===SE))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Ap)},pp=t=>{let e=t.replace(kE,Yl),r=!1;for(e.startsWith(CE)&&(r=!0);e.match(fp);)e=e.replace(fp,Yl);return r&&(e=Yl+e),e},Ap=t=>pp(se.normalize(pp(t))),mp=(t="")=>e=>typeof e=="string"?Ap(se.isAbsolute(e)?e:se.join(t,e)):e,PE=(t,e)=>se.isAbsolute(t)?t:se.join(e,t),RE=Object.freeze(new Set),Xl=class{constructor(e,r){this.path=e,this._removeWatcher=r,this.items=new Set}add(e){let{items:r}=this;r&&e!==gp&&e!==xE&&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 vE(n)}catch{this._removeWatcher&&this._removeWatcher(se.dirname(n),se.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=eo,this.items=RE,Object.freeze(this)}},NE="stat",TE="lstat",Zl=class{constructor(e,r,n){this.fsw=n;let i=e;this.path=e=e.replace(OE,""),this.watchPath=i,this.fullWatchPath=se.resolve(i),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?NE:TE}entryPath(e){return se.join(this.watchPath,se.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)}},no=class extends EE{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?ro(e.ignored):ro([]),awaitWriteFinish:r===!0?n:typeof r=="object"?{...n,...r}:!1};cp&&(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=eo,this._readyEmitted=!0,process.nextTick(()=>this.emit(be.READY)))},this._emitRaw=(...l)=>this.emit(be.RAW,...l),this._boundRemove=this._remove.bind(this),this.options=i,this._nodeFsHandler=new Zs(this),Object.freeze(i)}_addIgnoredPath(e){if(zl(e)){for(let r of this._ignoredPaths)if(zl(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)zl(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=dp(e);return i&&(s=s.map(o=>PE(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(se.dirname(a),se.basename(r||a))})}),this}unwatch(e){if(this.closed)return this;let r=dp(e),{cwd:n}=this.options;return r.forEach(i=>{!se.isAbsolute(i)&&!this._closers.has(i)&&(n&&(i=se.join(n,i)),i=se.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?se.relative(this.options.cwd,n):n)||gp;e[s]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==be.ERROR&&this.emit(be.ALL,e,...r)}async _emit(e,r,n){if(this.closed)return;let i=this.options;Vl&&(r=se.normalize(r)),i.cwd&&(r=se.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===be.UNLINK)return this._pendingUnlinks.set(r,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((l,u)=>{this.emit(...l),this.emit(be.ALL,...l),this._pendingUnlinks.delete(u)})},typeof i.atomic=="number"?i.atomic:100),this;e===be.ADD&&this._pendingUnlinks.has(r)&&(e=be.CHANGE,this._pendingUnlinks.delete(r))}if(o&&(e===be.ADD||e===be.CHANGE)&&this._readyEmitted){let l=(u,f)=>{u?(e=be.ERROR,s[0]=u,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===be.CHANGE&&!this._throttle(be.CHANGE,r,50))return this;if(i.alwaysStat&&n===void 0&&(e===be.ADD||e===be.ADD_DIR||e===be.CHANGE)){let l=i.cwd?se.join(i.cwd,r):r,u;try{u=await _E(l)}catch{}if(!u||this.closed)return;s.push(u)}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(be.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 u=i.get(r),f=u?u.count:0;return i.delete(r),clearTimeout(o),u&&clearTimeout(u.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&&!se.isAbsolute(e)&&(l=se.join(this.options.cwd,e));let u=new Date,f=this._pendingWrites;function c(d){bE(l,(p,m)=>{if(p||!f.has(e)){p&&p.code!=="ENOENT"&&i(p);return}let g=Number(new Date);d&&m.size!==d.size&&(f.get(e).lastChange=g);let A=f.get(e);g-A.lastChange>=r?(f.delete(e),i(void 0,m)):a=setTimeout(c,o,m)})}f.has(e)||(f.set(e,{lastChange:u,cancelWait:()=>(f.delete(e),clearTimeout(a),n)}),a=setTimeout(c,o))}_isIgnored(e,r){if(this.options.atomic&&IE.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(mp(n)),a=[...[...this._ignoredPaths].map(mp(n)),...s];this._userIgnored=DE(a,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new Zl(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=se.resolve(e);return this._watched.has(r)||this._watched.set(r,new Xl(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,n){let i=se.join(e,r),s=se.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(d=>this._remove(i,d));let l=this._getWatchedDir(e),u=l.has(r);l.remove(r),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=i;if(this.options.cwd&&(f=se.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===be.ADD)return;this._watched.delete(i),this._watched.delete(s);let c=n?be.UNLINK_DIR:be.UNLINK;u&&!this._isIgnored(i)&&this._emit(c,i),this._closePath(i)}_closePath(e){this._closeFile(e);let r=se.dirname(e);this._getWatchedDir(r).remove(se.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:be.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},i=ip(e,n);return this._streams.add(i),i.once(lp,()=>{i=void 0}),i.once(Jl,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};function FE(t,e={}){let r=new no(e);return r.add(t),r}var yp={watch:FE,FSWatcher:no};import Wn from"node:module";import{MessageChannel as $S}from"node:worker_threads";var QE=Object.defineProperty,wp=(t,e)=>QE(t,"name",{value:e,configurable:!0}),ME=wp((t,e)=>{let r=t[0]-e[0];if(r===0){let n=t[1]-e[1];return n===0?t[2]>=e[2]:n>0}return r>0},"isVersionGreaterOrEqual"),jE=process.versions.node.split(".").map(Number),Et=wp((t,e=jE)=>{for(let r=0;r<t.length;r+=1){let n=t[r];if(r===t.length-1||e[0]===n[0])return ME(e,n)}return!1},"isFeatureSupported");var bp=[[24,11,1],[25,1,0],[26,0,0]],_p=[[18,19,0],[20,10,0],[21,0,0]];var In=[[20,11,0],[21,3,0]],vp=[[20,11,0],[21,2,0]],Ep=[[20,19,0],[22,12,0],[23,0,0]];import{createRequire as WE}from"module";import KE from"node:path";import UE from"node:path";import xp from"node:os";var{geteuid:Cp}=process,qE=Cp?Cp():xp.userInfo().username,io=UE.join(xp.tmpdir(),`tsx-${qE}`);var HE=Object.defineProperty,$E=(t,e)=>HE(t,"name",{value:e,configurable:!0}),jr=WE(import.meta.url),GE=process.platform==="win32",Sp=$E(t=>{let e=KE.join(io,`${t}.pipe`);return GE?`\\\\?\\pipe\\${e}`:e},"getPipePath");import Xe from"node:module";import G from"node:path";import{fileURLToPath as Ro,pathToFileURL as Ox}from"node:url";import Xr,{writeSync as Bx}from"node:fs";import Lx from"fs";import Dx from"os";import Px from"path";var nr=vn(sc(),1);import Tn from"node:path";import{fileURLToPath as qC,pathToFileURL as HC}from"node:url";import $C from"node:crypto";import qt from"node:fs";import WC from"node:os";var UC=Object.defineProperty,k=(t,e)=>UC(t,"name",{value:e,configurable:!0}),Cc=k(t=>$C.createHash("sha1").update(t).digest("hex"),"sha1"),KC=44,GC=59,nm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",um=new Uint8Array(64),JC=new Uint8Array(128);for(let t=0;t<nm.length;t++){let e=nm.charCodeAt(t);um[t]=e,JC[e]=t}function Pn(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let i=n&31;n>>>=5,n>0&&(i|=32),t.write(um[i])}while(n>0);return e}k(Pn,"encodeInteger$1");var im=1024*16,sm=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},VC=class{static{k(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(im)}write(t){let{buffer:e}=this;e[this.pos++]=t,this.pos===im&&(this.out+=sm.decode(e),this.pos=0)}flush(){let{buffer:t,out:e,pos:r}=this;return r>0?e+sm.decode(t.subarray(0,r)):e}};function fm(t){let e=new VC,r=0,n=0,i=0,s=0;for(let o=0;o<t.length;o++){let a=t[o];if(o>0&&e.write(GC),a.length===0)continue;let l=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&e.write(KC),l=Pn(e,f[0],l),f.length!==1&&(r=Pn(e,f[1],r),n=Pn(e,f[2],n),i=Pn(e,f[3],i),f.length!==4&&(s=Pn(e,f[4],s)))}}return e.flush()}k(fm,"encode$1");var _o=class t{static{k(this,"BitSet")}constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},vo=class t{static{k(this,"Chunk")}constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),i=this.original.slice(r);this.original=n;let s=new t(e,this.end,i);return s.outro=this.outro,this.outro="",this.end=e,this.edited?(s.edit("",!1),this.content=""):this.content=n,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function hm(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}k(hm,"getBtoa");var YC=hm(),zC=class{static{k(this,"SourceMap")}constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=fm(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+YC(this.toString())}};function dm(t){let e=t.split(`
|
|
190
|
+
`),r=e.filter(s=>/^\t+/.test(s)),n=e.filter(s=>/^ {2,}/.test(s));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let i=n.reduce((s,o)=>{let a=/^ +/.exec(o)[0].length;return Math.min(a,s)},1/0);return new Array(i+1).join(" ")}k(dm,"guessIndent");function pm(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}k(pm,"getRelativePath");var XC=Object.prototype.toString;function mm(t){return XC.call(t)==="[object Object]"}k(mm,"isObject");function fc(t){let e=t.split(`
|
|
191
|
+
`),r=[];for(let n=0,i=0;n<e.length;n++)r.push(i),i+=e[n].length+1;return k(function(n){let i=0,s=r.length;for(;i<s;){let l=i+s>>1;n<r[l]?s=l:i=l+1}let o=i-1,a=n-r[o];return{line:o,column:a}},"locate")}k(fc,"getLocator");var ZC=/\w/,hc=class{static{k(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,i){if(r.length){let s=r.length-1,o=r.indexOf(`
|
|
192
|
+
`,0),a=-1;for(;o>=0&&s>o;){let u=[this.generatedCodeColumn,e,n.line,n.column];i>=0&&u.push(i),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=o,o=r.indexOf(`
|
|
193
|
+
`,o+1)}let l=[this.generatedCodeColumn,e,n.line,n.column];i>=0&&l.push(i),this.rawSegments.push(l),this.advance(r.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(e,r,n,i,s){let o=r.start,a=!0,l=!1;for(;o<r.end;){if(n[o]===`
|
|
194
|
+
`)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,l=!1;else{if(this.hires||a||s.has(o)){let u=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?ZC.test(n[o])?l||(this.rawSegments.push(u),l=!0):(this.rawSegments.push(u),l=!1):this.rawSegments.push(u)}i.column+=1,this.generatedCodeColumn+=1,a=!1}o+=1}this.pending=null}advance(e){if(!e)return;let r=e.split(`
|
|
195
|
+
`);if(r.length>1){for(let n=0;n<r.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=r[r.length-1].length}},Di=`
|
|
196
|
+
`,Dn={insertLeft:!1,insertRight:!1,storeName:!1},dc=class t{static{k(this,"MagicString")}constructor(e,r={}){let n=new vo(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new _o},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList},offset:{writable:!0,value:r.offset||0}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byEnd[e];return n?n.appendLeft(r):this.intro+=r,this}appendRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byStart[e];return n?n.appendRight(r):this.outro+=r,this}clone(){let e=new t(this.original,{filename:this.filename,offset:this.offset}),r=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=r.clone();for(;r;){e.byStart[n.start]=n,e.byEnd[n.end]=n;let i=r.next,s=i&&i.clone();s&&(n.next=s,s.previous=n,n=s),r=i}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new _o(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};let r=0,n=Object.keys(this.storedNames),i=new hc(e.hires),s=fc(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(o=>{let a=s(o.start);o.intro.length&&i.advance(o.intro),o.edited?i.addEdit(r,o.content,a,o.storeName?n.indexOf(o.original):-1):i.addUneditedChunk(r,o,this.original,a,this.sourcemapLocations),o.outro.length&&i.advance(o.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?pm(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:n,mappings:i.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(e){return new zC(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=dm(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,r){let n=/^[^\r\n]/gm;if(mm(e)&&(r=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;r=r||{};let i={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(u=>{for(let f=u[0];f<u[1];f+=1)i[f]=!0});let s=r.indentStart!==!1,o=k(u=>s?`${e}${u}`:(s=!0,u),"replacer");this.intro=this.intro.replace(n,o);let a=0,l=this.firstChunk;for(;l;){let u=l.end;if(l.edited)i[a]||(l.content=l.content.replace(n,o),l.content.length&&(s=l.content[l.content.length-1]===`
|
|
197
|
+
`));else for(a=l.start;a<u;){if(!i[a]){let f=this.original[a];f===`
|
|
198
|
+
`?s=!0:f!=="\r"&&s&&(s=!1,a===l.start||(this._splitChunk(l,a),l=l.next),l.prependRight(e))}a+=1}a=l.end,l=l.next}return this.outro=this.outro.replace(n,o),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,r){return Dn.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Dn.insertLeft=!0),this.appendLeft(e,r)}insertRight(e,r){return Dn.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Dn.insertRight=!0),this.prependRight(e,r)}move(e,r,n){if(e=e+this.offset,r=r+this.offset,n=n+this.offset,n>=e&&n<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(n);let i=this.byStart[e],s=this.byEnd[r],o=i.previous,a=s.next,l=this.byStart[n];if(!l&&s===this.lastChunk)return this;let u=l?l.previous:this.lastChunk;return o&&(o.next=a),a&&(a.previous=o),u&&(u.next=i),l&&(l.previous=s),i.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=u,s.next=l||null,u||(this.firstChunk=i),l||(this.lastChunk=s),this}overwrite(e,r,n,i){return i=i||{},this.update(e,r,n,{...i,overwrite:!i.contentOnly})}update(e,r,n,i){if(e=e+this.offset,r=r+this.offset,typeof n!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(r),i===!0&&(Dn.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Dn.storeName=!0),i={storeName:!0});let s=i!==void 0?i.storeName:!1,o=i!==void 0?i.overwrite:!1;if(s){let u=this.original.slice(e,r);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[e],l=this.byEnd[r];if(a){let u=a;for(;u!==l;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}a.edit(n,s,!o)}else{let u=new vo(e,r,"").edit(n,s);l.next=u,u.previous=l}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byEnd[e];return n?n.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byStart[e];return n?n.prependRight(r):this.outro=r+this.outro,this}remove(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=r>n.end?this.byStart[n.end]:null;return this}reset(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let n=this.byStart[e];for(;n;)n.reset(),n=r>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Di);if(e!==-1)return this.outro.substr(e+1);let r=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(Di),e!==-1)return n.outro.substr(e+1)+r;r=n.outro+r}if(n.content.length>0){if(e=n.content.lastIndexOf(Di),e!==-1)return n.content.substr(e+1)+r;r=n.content+r}if(n.intro.length>0){if(e=n.intro.lastIndexOf(Di),e!==-1)return n.intro.substr(e+1)+r;r=n.intro+r}}while(n=n.previous);return e=this.intro.lastIndexOf(Di),e!==-1?this.intro.substr(e+1)+r:this.intro+r}slice(e=0,r=this.original.length-this.offset){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}let n="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<r&&i.end>=r)return n;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);let s=i;for(;i;){i.intro&&(s!==i||i.start===e)&&(n+=i.intro);let o=i.start<r&&i.end>=r;if(o&&i.edited&&i.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);let a=s===i?e-i.start:0,l=o?i.content.length+r-i.end:i.content.length;if(n+=i.content.slice(a,l),i.outro&&(!o||i.end===r)&&(n+=i.outro),o)break;i=i.next}return n}snip(e,r){let n=this.clone();return n.remove(0,e),n.remove(r,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let r=this.lastSearchedChunk,n=r,i=e>r.end;for(;r;){if(r.contains(e))return this._splitChunk(r,e);if(r=i?this.byStart[r.end]:this.byEnd[r.start],r===n)return;n=r}}_splitChunk(e,r){if(e.edited&&e.content.length){let i=fc(this.original)(r);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} \u2013 "${e.original}")`)}let n=e.split(r);return this.byEnd[r]=e,this.byStart[r]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,r=this.firstChunk;for(;r;)e+=r.toString(),r=r.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,r=0;do r+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return r}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){let r=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;let n=this.lastChunk;do{let i=n.end,s=n.trimEnd(r);if(n.end!==i&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){let r=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;let n=this.firstChunk;do{let i=n.end,s=n.trimStart(r);if(n.end!==i&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,r){function n(s,o){return typeof r=="string"?r.replace(/\$(\$|&|\d+)/g,(a,l)=>l==="$"?"$":l==="&"?s[0]:+l<s.length?s[+l]:`$${l}`):r(...s,s.index,o,s.groups)}k(n,"getReplacement");function i(s,o){let a,l=[];for(;a=s.exec(o);)l.push(a);return l}if(k(i,"matchAll"),e.global)i(e,this.original).forEach(s=>{if(s.index!=null){let o=n(s,this.original);o!==s[0]&&this.overwrite(s.index,s.index+s[0].length,o)}});else{let s=this.original.match(e);if(s&&s.index!=null){let o=n(s,this.original);o!==s[0]&&this.overwrite(s.index,s.index+s[0].length,o)}}return this}_replaceString(e,r){let{original:n}=this,i=n.indexOf(e);return i!==-1&&this.overwrite(i,i+e.length,r),this}replace(e,r){return typeof e=="string"?this._replaceString(e,r):this._replaceRegexp(e,r)}_replaceAllString(e,r){let{original:n}=this,i=e.length;for(let s=n.indexOf(e);s!==-1;s=n.indexOf(e,s+i))n.slice(s,s+i)!==r&&this.overwrite(s,s+i,r);return this}replaceAll(e,r){if(typeof e=="string")return this._replaceAllString(e,r);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,r)}},_e,yo,cc,Pi=2<<19,om=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(t,e){let r=t.length,n=0;for(;n<r;)e[n]=t.charCodeAt(n++)}:function(t,e){let r=t.length,n=0;for(;n<r;){let i=t.charCodeAt(n);e[n++]=(255&i)<<8|i>>>8}},ex="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels",ve,gm,fe;function Am(t,e="@"){ve=t,gm=e;let r=2*ve.length+(2<<18);if(r>Pi||!_e){for(;r>Pi;)Pi*=2;yo=new ArrayBuffer(Pi),om(ex,new Uint16Array(yo,16,110)),_e=(function(o,a,l){var u=new o.Int8Array(l),f=new o.Int16Array(l),c=new o.Int32Array(l),d=new o.Uint8Array(l),p=new o.Uint16Array(l),m=1040;function g(){var h=0,w=0,x=0,S=0,N=0,X=0,he=0;he=m,m=m+10240|0,u[804]=1,u[803]=0,f[399]=0,f[400]=0,c[69]=c[2],u[805]=0,c[68]=0,u[802]=0,c[70]=he+2048,c[71]=he,u[806]=0,h=(c[3]|0)+-2|0,c[72]=h,w=h+(c[66]<<1)|0,c[73]=w;e:for(;;){if(x=h+2|0,c[72]=x,h>>>0>=w>>>0){S=18;break}t:do switch(f[x>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(f[400]|0)&&De(x)|0&&!(L(h+4|0,16,10)|0)&&(A(),(u[804]|0)==0)){S=9;break e}else S=17;break}case 105:{De(x)|0&&!(L(h+4|0,26,10)|0)&&y(),S=17;break}case 59:{S=17;break}case 47:switch(f[h+4>>1]|0){case 47:{ie();break t}case 42:{P(1);break t}default:{S=16;break e}}default:{S=16;break e}}while(!1);(S|0)==17&&(S=0,c[69]=c[72]),h=c[72]|0,w=c[73]|0}(S|0)==9?(h=c[72]|0,c[69]=h,S=19):(S|0)==16?(u[804]=0,c[72]=h,S=19):(S|0)==18&&(u[802]|0?h=0:(h=x,S=19));do if((S|0)==19){e:for(;;){if(w=h+2|0,c[72]=w,h>>>0>=(c[73]|0)>>>0){S=92;break}t:do switch(f[w>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(f[400]|0)&&De(w)|0&&!(L(h+4|0,16,10)|0)&&A(),S=91;break}case 105:{De(w)|0&&!(L(h+4|0,26,10)|0)&&y(),S=91;break}case 99:{De(w)|0&&!(L(h+4|0,36,8)|0)&&Rr(f[h+12>>1]|0)|0&&(u[806]=1),S=91;break}case 40:{x=c[70]|0,h=f[400]|0,S=h&65535,c[x+(S<<3)>>2]=1,w=c[69]|0,f[400]=h+1<<16>>16,c[x+(S<<3)+4>>2]=w,S=91;break}case 41:{if(w=f[400]|0,!(w<<16>>16)){S=36;break e}x=w+-1<<16>>16,f[400]=x,S=f[399]|0,w=S&65535,S<<16>>16&&(c[(c[70]|0)+((x&65535)<<3)>>2]|0)==5&&(w=c[(c[71]|0)+(w+-1<<2)>>2]|0,x=w+4|0,c[x>>2]|0||(c[x>>2]=(c[69]|0)+2),c[w+12>>2]=h+4,f[399]=S+-1<<16>>16),S=91;break}case 123:{S=c[69]|0,x=c[63]|0,h=S;do if((f[S>>1]|0)==41&(x|0)!=0&&(c[x+4>>2]|0)==(S|0))if(w=c[64]|0,c[63]=w,w){c[w+32>>2]=0;break}else{c[59]=0;break}while(!1);x=c[70]|0,w=f[400]|0,S=w&65535,c[x+(S<<3)>>2]=u[806]|0?6:2,f[400]=w+1<<16>>16,c[x+(S<<3)+4>>2]=h,u[806]=0,S=91;break}case 125:{if(h=f[400]|0,!(h<<16>>16)){S=49;break e}x=c[70]|0,S=h+-1<<16>>16,f[400]=S,(c[x+((S&65535)<<3)>>2]|0)==4&&E(),S=91;break}case 39:{O(39),S=91;break}case 34:{O(34),S=91;break}case 47:switch(f[h+4>>1]|0){case 47:{ie();break t}case 42:{P(1);break t}default:{h=c[69]|0,w=f[h>>1]|0;r:do if(!(j(w)|0))w<<16>>16==41?(x=f[400]|0,_t(c[(c[70]|0)+((x&65535)<<3)+4>>2]|0)|0||(S=65)):S=64;else switch(w<<16>>16){case 46:if(((f[h+-2>>1]|0)+-48&65535)<10){S=64;break r}else break r;case 43:if((f[h+-2>>1]|0)==43){S=64;break r}else break r;case 45:if((f[h+-2>>1]|0)==45){S=64;break r}else break r;default:break r}while(!1);(S|0)==64&&(x=f[400]|0,S=65);r:do if((S|0)==65){if(S=0,x<<16>>16&&(N=c[70]|0,X=(x&65535)+-1|0,w<<16>>16==102?(c[N+(X<<3)>>2]|0)==1:0)){if((f[h+-2>>1]|0)==111&&V(c[N+(X<<3)+4>>2]|0,44,3)|0)break}else S=69;if((S|0)==69&&w<<16>>16==125&&(S=c[70]|0,x=x&65535,B(c[S+(x<<3)+4>>2]|0)|0||(c[S+(x<<3)>>2]|0)==6))break;if(!(b(h)|0)){switch(w<<16>>16){case 0:break r;case 47:{if(u[805]|0)break r;break}default:}if(S=c[65]|0,S|0&&h>>>0>=(c[S>>2]|0)>>>0&&h>>>0<=(c[S+4>>2]|0)>>>0){F(),u[805]=0,S=91;break t}x=c[3]|0;do{if(h>>>0<=x>>>0)break;h=h+-2|0,c[69]=h,w=f[h>>1]|0}while(!(ne(w)|0));if($(w)|0){do{if(h>>>0<=x>>>0)break;h=h+-2|0,c[69]=h}while($(f[h>>1]|0)|0);if(Q(h)|0){F(),u[805]=0,S=91;break t}}u[805]=1,S=91;break t}}while(!1);F(),u[805]=0,S=91;break t}}case 96:{x=c[70]|0,w=f[400]|0,S=w&65535,c[x+(S<<3)+4>>2]=c[69],f[400]=w+1<<16>>16,c[x+(S<<3)>>2]=3,E(),S=91;break}default:S=91}while(!1);(S|0)==91&&(S=0,c[69]=c[72]),h=c[72]|0}if((S|0)==36){st(),h=0;break}else if((S|0)==49){st(),h=0;break}else if((S|0)==92){h=u[802]|0?0:(f[399]|f[400])<<16>>16==0;break}}while(!1);return m=he,h|0}k(g,"b");function A(){var h=0,w=0,x=0,S=0,N=0,X=0,he=0,Nr=0,El=0,Cl=0,xl=0,Sl=0,de=0,we=0;Nr=c[72]|0,El=c[65]|0,we=Nr+12|0,c[72]=we,x=v(1)|0,h=c[72]|0,(h|0)==(we|0)&&!(D(x)|0)||(de=3);e:do if((de|0)==3){t:do switch(x<<16>>16){case 123:{for(c[72]=h+2,h=v(1)|0,w=c[72]|0;;){if(_n(h)|0?(O(h),h=(c[72]|0)+2|0,c[72]=h):(pe(h)|0,h=c[72]|0),v(1)|0,h=M(w,h)|0,h<<16>>16==44&&(c[72]=(c[72]|0)+2,h=v(1)|0),h<<16>>16==125){de=15;break}if(we=w,w=c[72]|0,(w|0)==(we|0)){de=12;break}if(w>>>0>(c[73]|0)>>>0){de=14;break}}if((de|0)==12){st();break e}else if((de|0)==14){st();break e}else if((de|0)==15){u[803]=1,c[72]=(c[72]|0)+2;break t}break}case 42:{c[72]=h+2,v(1)|0,we=c[72]|0,M(we,we)|0;break}default:{switch(u[804]=0,x<<16>>16){case 100:{switch(Nr=h+14|0,c[72]=Nr,(v(1)|0)<<16>>16){case 97:{w=c[72]|0,!(L(w+2|0,72,8)|0)&&(N=w+10|0,$(f[N>>1]|0)|0)&&(c[72]=N,v(0)|0,de=22);break}case 102:{de=22;break}case 99:{w=c[72]|0,!(L(w+2|0,36,8)|0)&&(S=w+10|0,we=f[S>>1]|0,Rr(we)|0|we<<16>>16==123)&&(c[72]=S,X=v(1)|0,X<<16>>16!=123)&&(Sl=X,de=31);break}default:}r:do if((de|0)==22&&(he=c[72]|0,(L(he+2|0,80,14)|0)==0)){if(x=he+16|0,w=f[x>>1]|0,!(Rr(w)|0))switch(w<<16>>16){case 40:case 42:break;default:break r}c[72]=x,w=v(1)|0,w<<16>>16==42&&(c[72]=(c[72]|0)+2,w=v(1)|0),w<<16>>16!=40&&(Sl=w,de=31)}while(!1);if((de|0)==31&&(Cl=c[72]|0,pe(Sl)|0,xl=c[72]|0,xl>>>0>Cl>>>0)){Y(h,Nr,Cl,xl),c[72]=(c[72]|0)+-2;break e}Y(h,Nr,0,0),c[72]=h+12;break e}case 97:{c[72]=h+10,v(0)|0,h=c[72]|0,de=35;break}case 102:{de=35;break}case 99:{if(!(L(h+2|0,36,8)|0)&&(w=h+10|0,ne(f[w>>1]|0)|0)){c[72]=w,we=v(1)|0,de=c[72]|0,pe(we)|0,we=c[72]|0,Y(de,we,de,we),c[72]=(c[72]|0)+-2;break e}h=h+4|0,c[72]=h;break}case 108:case 118:break;default:break e}if((de|0)==35){c[72]=h+16,h=v(1)|0,h<<16>>16==42&&(c[72]=(c[72]|0)+2,h=v(1)|0),de=c[72]|0,pe(h)|0,we=c[72]|0,Y(de,we,de,we),c[72]=(c[72]|0)+-2;break e}c[72]=h+6,u[804]=0,x=v(1)|0,h=c[72]|0,x=(pe(x)|0|32)<<16>>16==123,S=c[72]|0,x&&(c[72]=S+2,we=v(1)|0,h=c[72]|0,pe(we)|0);r:for(;w=c[72]|0,(w|0)!=(h|0);){if(Y(h,w,h,w),w=v(1)|0,x)switch(w<<16>>16){case 93:case 125:break e;default:}if(h=c[72]|0,w<<16>>16!=44){de=51;break}switch(c[72]=h+2,w=v(1)|0,h=c[72]|0,w<<16>>16){case 91:case 123:{de=51;break r}default:}pe(w)|0}if((de|0)==51&&(c[72]=h+-2),!x)break e;c[72]=S+-2;break e}}while(!1);if(we=(v(1)|0)<<16>>16==102,h=c[72]|0,we&&!(L(h+2|0,66,6)|0))for(c[72]=h+8,_(Nr,v(1)|0,0),h=El|0?El+16|0:240;;){if(h=c[h>>2]|0,!h)break e;c[h+12>>2]=0,c[h+8>>2]=0,h=h+16|0}c[72]=h+-2}while(!1)}k(A,"k");function y(){var h=0,w=0,x=0,S=0,N=0,X=0,he=0;N=c[72]|0,x=N+12|0,c[72]=x,S=v(1)|0,w=c[72]|0;e:do if(S<<16>>16!=46)S<<16>>16==115&w>>>0>x>>>0?!(L(w+2|0,56,10)|0)&&(h=w+12|0,Rr(f[h>>1]|0)|0)?X=14:(w=6,x=0,X=46):(h=S,x=0,X=15);else switch(c[72]=w+2,(v(1)|0)<<16>>16){case 109:{if(h=c[72]|0,L(h+2|0,50,6)|0||(w=c[69]|0,!(it(w)|0)&&(f[w>>1]|0)==46))break e;C(N,N,h+8|0,2);break e}case 115:{if(h=c[72]|0,L(h+2|0,56,10)|0||(w=c[69]|0,!(it(w)|0)&&(f[w>>1]|0)==46))break e;h=h+12|0,X=14;break e}default:break e}while(!1);(X|0)==14&&(c[72]=h,h=v(1)|0,x=1,X=15);e:do if((X|0)==15)switch(h<<16>>16){case 40:{if(w=c[70]|0,he=f[400]|0,S=he&65535,c[w+(S<<3)>>2]=5,h=c[72]|0,f[400]=he+1<<16>>16,c[w+(S<<3)+4>>2]=h,(f[c[69]>>1]|0)==46)break e;switch(c[72]=h+2,w=v(1)|0,C(N,c[72]|0,0,h),x?(h=c[63]|0,c[h+28>>2]=5):h=c[63]|0,N=c[71]|0,he=f[399]|0,f[399]=he+1<<16>>16,c[N+((he&65535)<<2)>>2]=h,w<<16>>16){case 39:{O(39);break}case 34:{O(34);break}default:{c[72]=(c[72]|0)+-2;break e}}switch(h=(c[72]|0)+2|0,c[72]=h,(v(1)|0)<<16>>16){case 44:{c[72]=(c[72]|0)+2,v(1)|0,N=c[63]|0,c[N+4>>2]=h,he=c[72]|0,c[N+16>>2]=he,u[N+24>>0]=1,c[72]=he+-2;break e}case 41:{f[400]=(f[400]|0)+-1<<16>>16,he=c[63]|0,c[he+4>>2]=h,c[he+12>>2]=(c[72]|0)+2,u[he+24>>0]=1,f[399]=(f[399]|0)+-1<<16>>16;break e}default:{c[72]=(c[72]|0)+-2;break e}}}case 123:{if(x){w=12,x=1,X=46;break e}if(h=c[72]|0,f[400]|0){c[72]=h+-2;break e}for(;!(h>>>0>=(c[73]|0)>>>0);){if(h=v(1)|0,_n(h)|0)O(h);else if(h<<16>>16==125){X=36;break}h=(c[72]|0)+2|0,c[72]=h}if((X|0)==36&&(c[72]=(c[72]|0)+2),he=(v(1)|0)<<16>>16==102,h=c[72]|0,he&&L(h+2|0,66,6)|0){st();break e}if(c[72]=h+8,h=v(1)|0,_n(h)|0){_(N,h,0);break e}else{st();break e}}default:{if(x){w=12,x=1,X=46;break e}switch(h<<16>>16){case 42:case 39:case 34:{x=0,X=48;break e}default:{w=6,x=0,X=46;break e}}}}while(!1);(X|0)==46&&(h=c[72]|0,(h|0)==(N+(w<<1)|0)?c[72]=h+-2:X=48);do if((X|0)==48){if(f[400]|0){c[72]=(c[72]|0)+-2;break}for(h=c[73]|0,w=c[72]|0;;){if(w>>>0>=h>>>0){X=55;break}if(S=f[w>>1]|0,_n(S)|0){X=53;break}he=w+2|0,c[72]=he,w=he}if((X|0)==53){_(N,S,x);break}else if((X|0)==55){st();break}}while(!1)}k(y,"l");function _(h,w,x){h=h|0,w=w|0,x=x|0;var S=0,N=0;switch(S=(c[72]|0)+2|0,w<<16>>16){case 39:{O(39),N=5;break}case 34:{O(34),N=5;break}default:st()}do if((N|0)==5){if(C(h,S,c[72]|0,1),x&&(c[(c[63]|0)+28>>2]=4),c[72]=(c[72]|0)+2,w=v(0)|0,x=w<<16>>16==97,x?(S=c[72]|0,L(S+2|0,94,10)|0&&(N=13)):(S=c[72]|0,w<<16>>16==119&&(f[S+2>>1]|0)==105&&(f[S+4>>1]|0)==116&&(f[S+6>>1]|0)==104||(N=13)),(N|0)==13){c[72]=S+-2;break}if(c[72]=S+((x?6:4)<<1),(v(1)|0)<<16>>16!=123){c[72]=S;break}x=c[72]|0,w=x;e:for(;;){switch(c[72]=w+2,w=v(1)|0,w<<16>>16){case 39:{O(39),c[72]=(c[72]|0)+2,w=v(1)|0;break}case 34:{O(34),c[72]=(c[72]|0)+2,w=v(1)|0;break}default:w=pe(w)|0}if(w<<16>>16!=58){N=22;break}switch(c[72]=(c[72]|0)+2,(v(1)|0)<<16>>16){case 39:{O(39);break}case 34:{O(34);break}default:{N=26;break e}}switch(c[72]=(c[72]|0)+2,(v(1)|0)<<16>>16){case 125:{N=31;break e}case 44:break;default:{N=30;break e}}if(c[72]=(c[72]|0)+2,(v(1)|0)<<16>>16==125){N=31;break}w=c[72]|0}if((N|0)==22){c[72]=S;break}else if((N|0)==26){c[72]=S;break}else if((N|0)==30){c[72]=S;break}else if((N|0)==31){N=c[63]|0,c[N+16>>2]=x,c[N+12>>2]=(c[72]|0)+2;break}}while(!1)}k(_,"u");function b(h){h=h|0;e:do switch(f[h>>1]|0){case 100:switch(f[h+-2>>1]|0){case 105:{h=V(h+-4|0,104,2)|0;break e}case 108:{h=V(h+-4|0,108,3)|0;break e}default:{h=0;break e}}case 101:switch(f[h+-2>>1]|0){case 115:switch(f[h+-4>>1]|0){case 108:{h=re(h+-6|0,101)|0;break e}case 97:{h=re(h+-6|0,99)|0;break e}default:{h=0;break e}}case 116:{h=V(h+-4|0,114,4)|0;break e}case 117:{h=V(h+-4|0,122,6)|0;break e}default:{h=0;break e}}case 102:{if((f[h+-2>>1]|0)==111&&(f[h+-4>>1]|0)==101)switch(f[h+-6>>1]|0){case 99:{h=V(h+-8|0,134,6)|0;break e}case 112:{h=V(h+-8|0,146,2)|0;break e}default:{h=0;break e}}else h=0;break}case 107:{h=V(h+-2|0,150,4)|0;break}case 110:{h=h+-2|0,re(h,105)|0?h=1:h=V(h,158,5)|0;break}case 111:{h=re(h+-2|0,100)|0;break}case 114:{h=V(h+-2|0,168,7)|0;break}case 116:{h=V(h+-2|0,182,4)|0;break}case 119:switch(f[h+-2>>1]|0){case 101:{h=re(h+-4|0,110)|0;break e}case 111:{h=V(h+-4|0,190,3)|0;break e}default:{h=0;break e}}default:h=0}while(!1);return h|0}k(b,"o");function E(){var h=0,w=0,x=0,S=0;w=c[73]|0,x=c[72]|0;e:for(;;){if(h=x+2|0,x>>>0>=w>>>0){w=10;break}switch(f[h>>1]|0){case 96:{w=7;break e}case 36:{if((f[x+4>>1]|0)==123){w=6;break e}break}case 92:{h=x+4|0;break}default:}x=h}(w|0)==6?(h=x+4|0,c[72]=h,w=c[70]|0,S=f[400]|0,x=S&65535,c[w+(x<<3)>>2]=4,f[400]=S+1<<16>>16,c[w+(x<<3)+4>>2]=h):(w|0)==7?(c[72]=h,x=c[70]|0,S=(f[400]|0)+-1<<16>>16,f[400]=S,(c[x+((S&65535)<<3)>>2]|0)!=3&&st()):(w|0)==10&&(c[72]=h,st())}k(E,"h");function v(h){h=h|0;var w=0,x=0,S=0;x=c[72]|0;e:do{w=f[x>>1]|0;t:do if(w<<16>>16!=47)if(h){if(Rr(w)|0)break;break e}else{if($(w)|0)break;break e}else switch(f[x+2>>1]|0){case 47:{ie();break t}case 42:{P(h);break t}default:{w=47;break e}}while(!1);S=c[72]|0,x=S+2|0,c[72]=x}while(S>>>0<(c[73]|0)>>>0);return w|0}k(v,"w");function C(h,w,x,S){h=h|0,w=w|0,x=x|0,S=S|0;var N=0,X=0;X=c[67]|0,c[67]=X+36,N=c[63]|0,c[(N|0?N+32|0:236)>>2]=X,c[64]=N,c[63]=X,c[X+8>>2]=h,(S|0)==2?(h=3,N=x):(N=(S|0)==1,h=N?1:2,N=N?x+2|0:0),c[X+12>>2]=N,c[X+28>>2]=h,c[X>>2]=w,c[X+4>>2]=x,c[X+16>>2]=0,c[X+20>>2]=S,w=(S|0)==1,u[X+24>>0]=w&1,c[X+32>>2]=0,w|(S|0)==2&&(u[803]=1)}k(C,"d");function O(h){h=h|0;var w=0,x=0,S=0,N=0;for(N=c[73]|0,w=c[72]|0;;){if(S=w+2|0,w>>>0>=N>>>0){w=9;break}if(x=f[S>>1]|0,x<<16>>16==h<<16>>16){w=10;break}if(x<<16>>16==92)x=w+4|0,(f[x>>1]|0)==13?(w=w+6|0,w=(f[w>>1]|0)==10?w:x):w=x;else if(vl(x)|0){w=9;break}else w=S}(w|0)==9?(c[72]=S,st()):(w|0)==10&&(c[72]=S)}k(O,"v");function M(h,w){h=h|0,w=w|0;var x=0,S=0,N=0,X=0;return x=c[72]|0,S=f[x>>1]|0,X=(h|0)==(w|0),N=X?0:h,X=X?0:w,S<<16>>16==97&&(c[72]=x+4,x=v(1)|0,h=c[72]|0,_n(x)|0?(O(x),w=(c[72]|0)+2|0,c[72]=w):(pe(x)|0,w=c[72]|0),S=v(1)|0,x=c[72]|0),(x|0)!=(h|0)&&Y(h,w,N,X),S|0}k(M,"A");function q(){var h=0,w=0,x=0;x=c[73]|0,w=c[72]|0;e:for(;;){if(h=w+2|0,w>>>0>=x>>>0){w=6;break}switch(f[h>>1]|0){case 13:case 10:{w=6;break e}case 93:{w=7;break e}case 92:{h=w+4|0;break}default:}w=h}return(w|0)==6?(c[72]=h,st(),h=0):(w|0)==7&&(c[72]=h,h=93),h|0}k(q,"C");function F(){var h=0,w=0,x=0;e:for(;;){if(h=c[72]|0,w=h+2|0,c[72]=w,h>>>0>=(c[73]|0)>>>0){x=7;break}switch(f[w>>1]|0){case 13:case 10:{x=7;break e}case 47:break e;case 91:{q()|0;break}case 92:{c[72]=h+4;break}default:}}(x|0)==7&&st()}k(F,"g");function B(h){switch(h=h|0,f[h>>1]|0){case 62:{h=(f[h+-2>>1]|0)==61;break}case 41:case 59:{h=1;break}case 104:{h=V(h+-2|0,210,4)|0;break}case 121:{h=V(h+-2|0,218,6)|0;break}case 101:{h=V(h+-2|0,230,3)|0;break}default:h=0}return h|0}k(B,"p");function P(h){h=h|0;var w=0,x=0,S=0,N=0,X=0;for(N=(c[72]|0)+2|0,c[72]=N,x=c[73]|0;w=N+2|0,!(N>>>0>=x>>>0||(S=f[w>>1]|0,!h&&vl(S)|0));){if(S<<16>>16==42&&(f[N+4>>1]|0)==47){X=8;break}N=w}(X|0)==8&&(c[72]=w,w=N+4|0),c[72]=w}k(P,"y");function L(h,w,x){h=h|0,w=w|0,x=x|0;var S=0,N=0;e:do if(!x)h=0;else{for(;S=u[h>>0]|0,N=u[w>>0]|0,S<<24>>24==N<<24>>24;)if(x=x+-1|0,x)h=h+1|0,w=w+1|0;else{h=0;break e}h=(S&255)-(N&255)|0}while(!1);return h|0}k(L,"m");function D(h){h=h|0;e:do switch(h<<16>>16){case 38:case 37:case 33:{h=1;break}default:if((h&-8)<<16>>16==40|(h+-58&65535)<6)h=1;else{switch(h<<16>>16){case 91:case 93:case 94:{h=1;break e}default:}h=(h+-123&65535)<4}}while(!1);return h|0}k(D,"I");function j(h){h=h|0;e:do switch(h<<16>>16){case 38:case 37:case 33:break;default:if(!((h+-58&65535)<6|(h+-40&65535)<7&h<<16>>16!=41)){switch(h<<16>>16){case 91:case 94:break e;default:}return h<<16>>16!=125&(h+-123&65535)<4|0}}while(!1);return 1}k(j,"U");function K(h){h=h|0;var w=0;w=f[h>>1]|0;e:do if((w+-9&65535)>=5){switch(w<<16>>16){case 160:case 32:{w=1;break e}default:}if(D(w)|0)return w<<16>>16!=46|(it(h)|0)|0;w=0}else w=1;while(!1);return w|0}k(K,"x");function H(h){h=h|0;var w=0,x=0,S=0,N=0;return x=m,m=m+16|0,S=x,c[S>>2]=0,c[66]=h,w=c[3]|0,N=w+(h<<1)|0,h=N+2|0,f[N>>1]=0,c[S>>2]=h,c[67]=h,c[59]=0,c[63]=0,c[61]=0,c[60]=0,c[65]=0,c[62]=0,m=x,w|0}k(H,"S");function Y(h,w,x,S){h=h|0,w=w|0,x=x|0,S=S|0;var N=0,X=0;N=c[67]|0,c[67]=N+20,X=c[65]|0,c[(X|0?X+16|0:240)>>2]=N,c[65]=N,c[N>>2]=h,c[N+4>>2]=w,c[N+8>>2]=x,c[N+12>>2]=S,c[N+16>>2]=0,u[803]=1}k(Y,"O");function V(h,w,x){h=h|0,w=w|0,x=x|0;var S=0,N=0;return S=h+(0-x<<1)|0,N=S+2|0,h=c[3]|0,N>>>0>=h>>>0&&!(L(N,w,x<<1)|0)?(N|0)==(h|0)?h=1:h=K(S)|0:h=0,h|0}k(V,"$");function Q(h){switch(h=h|0,f[h>>1]|0){case 107:{h=V(h+-2|0,150,4)|0;break}case 101:{(f[h+-2>>1]|0)==117?h=V(h+-4|0,122,6)|0:h=0;break}default:h=0}return h|0}k(Q,"j");function re(h,w){h=h|0,w=w|0;var x=0;return x=c[3]|0,x>>>0<=h>>>0&&(f[h>>1]|0)==w<<16>>16?(x|0)==(h|0)?x=1:x=ne(f[h+-2>>1]|0)|0:x=0,x|0}k(re,"B");function ne(h){h=h|0;e:do if((h+-9&65535)<5)h=1;else{switch(h<<16>>16){case 32:case 160:{h=1;break e}default:}h=h<<16>>16!=46&(D(h)|0)}while(!1);return h|0}k(ne,"E");function ie(){var h=0,w=0,x=0;h=c[73]|0,x=c[72]|0;e:for(;w=x+2|0,!(x>>>0>=h>>>0);)switch(f[w>>1]|0){case 13:case 10:break e;default:x=w}c[72]=w}k(ie,"P");function pe(h){for(h=h|0;!(Rr(h)|0||D(h)|0);)if(h=(c[72]|0)+2|0,c[72]=h,h=f[h>>1]|0,!(h<<16>>16)){h=0;break}return h|0}k(pe,"q");function ge(){var h=0;switch(h=c[(c[61]|0)+20>>2]|0,h|0){case 1:{h=-1;break}case 2:{h=-2;break}default:h=h-(c[3]|0)>>1}return h|0}k(ge,"z");function _t(h){return h=h|0,!(V(h,196,5)|0)&&!(V(h,44,3)|0)?h=V(h,206,2)|0:h=1,h|0}k(_t,"D");function $(h){switch(h=h|0,h<<16>>16){case 160:case 32:case 12:case 11:case 9:{h=1;break}default:h=0}return h|0}k($,"F");function it(h){return h=h|0,(f[h>>1]|0)==46&&(f[h+-2>>1]|0)==46?h=(f[h+-4>>1]|0)==46:h=0,h|0}k(it,"G");function De(h){return h=h|0,(c[3]|0)==(h|0)?h=1:h=K(h+-2|0)|0,h|0}k(De,"H");function ht(){var h=0;return h=c[(c[62]|0)+12>>2]|0,h?h=h-(c[3]|0)>>1:h=-1,h|0}k(ht,"J");function vt(){var h=0;return h=c[(c[61]|0)+12>>2]|0,h?h=h-(c[3]|0)>>1:h=-1,h|0}k(vt,"K");function Je(){var h=0;return h=c[(c[62]|0)+8>>2]|0,h?h=h-(c[3]|0)>>1:h=-1,h|0}k(Je,"L");function dr(){var h=0;return h=c[(c[61]|0)+16>>2]|0,h?h=h-(c[3]|0)>>1:h=-1,h|0}k(dr,"M");function zt(){var h=0;return h=c[(c[61]|0)+4>>2]|0,h?h=h-(c[3]|0)>>1:h=-1,h|0}k(zt,"N");function js(){var h=0;return h=c[61]|0,h=c[(h|0?h+32|0:236)>>2]|0,c[61]=h,(h|0)!=0|0}k(js,"Q");function Us(){var h=0;return h=c[62]|0,h=c[(h|0?h+16|0:240)>>2]|0,c[62]=h,(h|0)!=0|0}k(Us,"R");function st(){u[802]=1,c[68]=(c[72]|0)-(c[3]|0)>>1,c[72]=(c[73]|0)+2}k(st,"T");function Rr(h){return h=h|0,(h|128)<<16>>16==160|(h+-9&65535)<5|0}k(Rr,"V");function _n(h){return h=h|0,h<<16>>16==39|h<<16>>16==34|0}k(_n,"W");function Rh(){return(c[(c[61]|0)+8>>2]|0)-(c[3]|0)>>1|0}k(Rh,"X");function Nh(){return(c[(c[62]|0)+4>>2]|0)-(c[3]|0)>>1|0}k(Nh,"Y");function vl(h){return h=h|0,h<<16>>16==13|h<<16>>16==10|0}k(vl,"Z");function Th(){return(c[c[61]>>2]|0)-(c[3]|0)>>1|0}k(Th,"_");function Fh(){return(c[c[62]>>2]|0)-(c[3]|0)>>1|0}k(Fh,"ee");function Qh(){return d[(c[61]|0)+24>>0]|0|0}k(Qh,"ae");function Mh(h){h=h|0,c[3]=h}k(Mh,"re");function jh(){return c[(c[61]|0)+28>>2]|0}k(jh,"ie");function Uh(){return(u[803]|0)!=0|0}k(Uh,"se");function qh(){return(u[804]|0)!=0|0}k(qh,"fe");function Hh(){return c[68]|0}k(Hh,"te");function $h(h){return h=h|0,m=h+992+15&-16,992}return k($h,"ce"),{su:$h,ai:dr,e:Hh,ee:Nh,ele:ht,els:Je,es:Fh,f:qh,id:ge,ie:zt,ip:Qh,is:Th,it:jh,ms:Uh,p:g,re:Us,ri:js,sa:H,se:vt,ses:Mh,ss:Rh}})(typeof self<"u"?self:global,{},yo),cc=_e.su(Pi-(2<<17))}let n=ve.length+1;_e.ses(cc),_e.sa(n-1),om(ve,new Uint16Array(yo,cc,n)),_e.p()||(fe=_e.e(),rr());let i=[],s=[];for(;_e.ri();){let o=_e.is(),a=_e.ie(),l=_e.ai(),u=_e.id(),f=_e.ss(),c=_e.se(),d=_e.it(),p;_e.ip()&&(p=wo(u===-1?o:o+1,ve.charCodeAt(u===-1?o-1:o))),i.push({t:d,n:p,s:o,e:a,ss:f,se:c,d:u,a:l})}for(;_e.re();){let o=_e.es(),a=_e.ee(),l=_e.els(),u=_e.ele(),f=ve.charCodeAt(o),c=l>=0?ve.charCodeAt(l):-1;s.push({s:o,e:a,ls:l,le:u,n:f===34||f===39?wo(o+1,f):ve.slice(o,a),ln:l<0?void 0:c===34||c===39?wo(l+1,c):ve.slice(l,u)})}return[i,s,!!_e.f(),!!_e.ms()]}k(Am,"parse");function wo(t,e){fe=t;let r="",n=fe;for(;;){fe>=ve.length&&rr();let i=ve.charCodeAt(fe);if(i===e)break;i===92?(r+=ve.slice(n,fe),r+=ym(),n=fe):(i===8232||i===8233||xc(i)&&rr(),++fe)}return r+=ve.slice(n,fe++),r}k(wo,"b");function ym(){let t=ve.charCodeAt(++fe);switch(++fe,t){case 110:return`
|
|
199
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(bo(2));case 117:return(function(){let e=ve.charCodeAt(fe),r;return e===123?(++fe,r=bo(ve.indexOf("}",fe)-fe),++fe,r>1114111&&rr()):r=bo(4),r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r)))})();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:ve.charCodeAt(fe)===10&&++fe;case 10:return"";case 56:case 57:rr();default:if(t>=48&&t<=55){let e=ve.substr(fe-1,3).match(/^[0-7]+/)[0],r=parseInt(e,8);return r>255&&(e=e.slice(0,-1),r=parseInt(e,8)),fe+=e.length-1,t=ve.charCodeAt(fe),e==="0"&&t!==56&&t!==57||rr(),String.fromCharCode(r)}return xc(t)?"":String.fromCharCode(t)}}k(ym,"k");function bo(t){let e=fe,r=0,n=0;for(let i=0;i<t;++i,++fe){let s,o=ve.charCodeAt(fe);if(o!==95){if(o>=97)s=o-97+10;else if(o>=65)s=o-65+10;else{if(!(o>=48&&o<=57))break;s=o-48}if(s>=16)break;n=o,r=16*r+s}else n!==95&&i!==0||rr(),n=o}return n!==95&&fe-e===t||rr(),r}k(bo,"l");function xc(t){return t===13||t===10}k(xc,"u");function rr(){throw Object.assign(Error(`Parse error ${gm}:${ve.slice(0,fe).split(`
|
|
200
|
+
`).length}:${fe-ve.lastIndexOf(`
|
|
201
|
+
`,fe-1)}`),{idx:fe})}k(rr,"o");var pc;typeof WebAssembly<"u"&&(async()=>{let{parse:t,init:e}=await Promise.resolve().then(()=>(rm(),tm));await e,pc=t})();var xo=k((t,e)=>pc?pc(t,e):Am(t,e),"parseEsm"),Ti=k(t=>{if(!t.includes("import")&&!t.includes("export"))return!1;try{return xo(t)[3]}catch{return!0}},"isESM"),Sc="2",tx=(t=>{let e="default";return t[e]&&typeof t[e]=="object"&&"__esModule"in t[e]?t[e]:t}).toString(),rx=`.then(${tx})`,Ar=k((t,e,r)=>{if(r){if(!e.includes("import("))return}else if(!e.includes("import"))return;let n=xo(e,t)[0].filter(a=>a.d>-1);if(n.length===0)return;let i=new dc(e);for(let a of n)i.appendRight(a.se,rx);let s=i.toString(),o=i.generateMap({source:t,includeContent:!1,hires:"boundary"});return{code:s,map:o}},"transformDynamicImport"),kc=k(t=>{try{let e=qt.readFileSync(t,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),am=k(()=>{},"noop"),lm=k(()=>Math.floor(Date.now()/1e8),"getTime"),mc=class extends Map{static{k(this,"FileCache")}cacheDirectory=io;oldCacheDirectory=Tn.join(WC.tmpdir(),"tsx");cacheFiles;constructor(){super(),qt.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=qt.readdirSync(this.cacheDirectory).map(e=>{let[r,n]=e.split("-");return{time:Number(r),key:n,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){let r=super.get(e);if(r)return r;let n=this.cacheFiles.find(o=>o.key===e);if(!n)return;let i=Tn.join(this.cacheDirectory,n.fileName),s=kc(i);if(!s){qt.promises.unlink(i).then(()=>{let o=this.cacheFiles.indexOf(n);this.cacheFiles.splice(o,1)},()=>{});return}return super.set(e,s),s}set(e,r){if(super.set(e,r),r){let n=lm();qt.promises.writeFile(Tn.join(this.cacheDirectory,`${n}-${e}`),JSON.stringify(r)).catch(am)}return this}expireDiskCache(){let e=lm();for(let r of this.cacheFiles)e-r.time>7&&qt.promises.unlink(Tn.join(this.cacheDirectory,r.fileName)).catch(am)}async removeOldCacheDirectory(){try{await qt.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in qt.promises?await qt.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await qt.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}},Fn=process.env.TSX_DISABLE_CACHE?new Map:new mc,wm=44,nx=59,cm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bm=new Uint8Array(64),_m=new Uint8Array(128);for(let t=0;t<cm.length;t++){let e=cm.charCodeAt(t);bm[t]=e,_m[e]=t}var uc=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}};function vm(t){let e=new Int32Array(5),r=[],n=0;do{let i=Em(t,n),s=[],o=!0,a=0;e[0]=0;for(let l=n;l<i;l++){let u;l=Rn(t,l,e,0);let f=e[0];f<a&&(o=!1),a=f,gc(t,l,i)?(l=Rn(t,l,e,1),l=Rn(t,l,e,2),l=Rn(t,l,e,3),gc(t,l,i)?(l=Rn(t,l,e,4),u=[f,e[1],e[2],e[3],e[4]]):u=[f,e[1],e[2],e[3]]):u=[f],s.push(u)}o||Cm(s),r.push(s),n=i+1}while(n<=t.length);return r}k(vm,"decode");function Em(t,e){let r=t.indexOf(";",e);return r===-1?t.length:r}k(Em,"indexOf");function Rn(t,e,r,n){let i=0,s=0,o=0;do{let l=t.charCodeAt(e++);o=_m[l],i|=(o&31)<<s,s+=5}while(o&32);let a=i&1;return i>>>=1,a&&(i=-2147483648|-i),r[n]+=i,e}k(Rn,"decodeInteger");function gc(t,e,r){return e>=r?!1:t.charCodeAt(e)!==wm}k(gc,"hasMoreVlq");function Cm(t){t.sort(xm)}k(Cm,"sort");function xm(t,e){return t[0]-e[0]}k(xm,"sortComparator$1");function Sm(t){let e=new Int32Array(5),r=1024*16,n=r-36,i=new Uint8Array(r),s=i.subarray(0,n),o=0,a="";for(let l=0;l<t.length;l++){let u=t[l];if(l>0&&(o===r&&(a+=uc.decode(i),o=0),i[o++]=nx),u.length!==0){e[0]=0;for(let f=0;f<u.length;f++){let c=u[f];o>n&&(a+=uc.decode(s),i.copyWithin(0,n,o),o-=n),f>0&&(i[o++]=wm),o=Nn(i,o,e,c,0),c.length!==1&&(o=Nn(i,o,e,c,1),o=Nn(i,o,e,c,2),o=Nn(i,o,e,c,3),c.length!==4&&(o=Nn(i,o,e,c,4)))}}}return a+uc.decode(i.subarray(0,o))}k(Sm,"encode");function Nn(t,e,r,n,i){let s=n[i],o=s-r[i];r[i]=s,o=o<0?-o<<1|1:o<<1;do{let a=o&31;o>>>=5,o>0&&(a|=32),t[e++]=bm[a]}while(o>0);return e}k(Nn,"encodeInteger");var ix=/^[\w+.-]+:\/\//,sx=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,ox=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function km(t){return ix.test(t)}k(km,"isAbsoluteUrl");function Im(t){return t.startsWith("//")}k(Im,"isSchemeRelativeUrl");function Ic(t){return t.startsWith("/")}k(Ic,"isAbsolutePath");function Om(t){return t.startsWith("file:")}k(Om,"isFileUrl");function Ac(t){return/^[.?#]/.test(t)}k(Ac,"isRelative");function Ri(t){let e=sx.exec(t);return Oc(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}k(Ri,"parseAbsoluteUrl");function Bm(t){let e=ox.exec(t),r=e[2];return Oc("file:","",e[1]||"","",Ic(r)?r:"/"+r,e[3]||"",e[4]||"")}k(Bm,"parseFileUrl");function Oc(t,e,r,n,i,s,o){return{scheme:t,user:e,host:r,port:n,path:i,query:s,hash:o,type:7}}k(Oc,"makeUrl");function yc(t){if(Im(t)){let r=Ri("http:"+t);return r.scheme="",r.type=6,r}if(Ic(t)){let r=Ri("http://foo.com"+t);return r.scheme="",r.host="",r.type=5,r}if(Om(t))return Bm(t);if(km(t))return Ri(t);let e=Ri("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?3:t.startsWith("#")?2:4:1,e}k(yc,"parseUrl");function Lm(t){if(t.endsWith("/.."))return t;let e=t.lastIndexOf("/");return t.slice(0,e+1)}k(Lm,"stripPathFilename");function Dm(t,e){Bc(e,e.type),t.path==="/"?t.path=e.path:t.path=Lm(e.path)+t.path}k(Dm,"mergePaths");function Bc(t,e){let r=e<=4,n=t.path.split("/"),i=1,s=0,o=!1;for(let l=1;l<n.length;l++){let u=n[l];if(!u){o=!0;continue}if(o=!1,u!=="."){if(u===".."){s?(o=!0,s--,i--):r&&(n[i++]=u);continue}n[i++]=u,s++}}let a="";for(let l=1;l<i;l++)a+="/"+n[l];(!a||o&&!a.endsWith("/.."))&&(a+="/"),t.path=a}k(Bc,"normalizePath");function Pm(t,e){if(!t&&!e)return"";let r=yc(t),n=r.type;if(e&&n!==7){let s=yc(e),o=s.type;switch(n){case 1:r.hash=s.hash;case 2:r.query=s.query;case 3:case 4:Dm(r,s);case 5:r.user=s.user,r.host=s.host,r.port=s.port;case 6:r.scheme=s.scheme}o>n&&(n=o)}Bc(r,n);let i=r.query+r.hash;switch(n){case 2:case 3:return i;case 4:{let s=r.path.slice(1);return s?Ac(e||t)&&!Ac(s)?"./"+s+i:s+i:i||"."}case 5:return r.path+i;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+i}}k(Pm,"resolve$1");function wc(t,e){return e&&!e.endsWith("/")&&(e+="/"),Pm(t,e)}k(wc,"resolve");function Rm(t){if(!t)return"";let e=t.lastIndexOf("/");return t.slice(0,e+1)}k(Rm,"stripFilename");var Gr=0;function Nm(t,e){let r=bc(t,0);if(r===t.length)return t;e||(t=t.slice());for(let n=r;n<t.length;n=bc(t,n+1))t[n]=Fm(t[n],e);return t}k(Nm,"maybeSort");function bc(t,e){for(let r=e;r<t.length;r++)if(!Tm(t[r]))return r;return t.length}k(bc,"nextUnsortedSegmentLine");function Tm(t){for(let e=1;e<t.length;e++)if(t[e][Gr]<t[e-1][Gr])return!1;return!0}k(Tm,"isSorted");function Fm(t,e){return e||(t=t.slice()),t.sort(Qm)}k(Fm,"sortSegments");function Qm(t,e){return t[Gr]-e[Gr]}k(Qm,"sortComparator");var Eo=!1;function Mm(t,e,r,n){for(;r<=n;){let i=r+(n-r>>1),s=t[i][Gr]-e;if(s===0)return Eo=!0,i;s<0?r=i+1:n=i-1}return Eo=!1,r-1}k(Mm,"binarySearch");function jm(t,e,r){for(let n=r-1;n>=0&&t[n][Gr]===e;r=n--);return r}k(jm,"lowerBound");function Um(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}k(Um,"memoizedState");function qm(t,e,r,n){let{lastKey:i,lastNeedle:s,lastIndex:o}=r,a=0,l=t.length-1;if(n===i){if(e===s)return Eo=o!==-1&&t[o][Gr]===e,o;e>=s?a=o===-1?0:o:l=o}return r.lastKey=n,r.lastNeedle=e,r.lastIndex=Mm(t,e,a,l)}k(qm,"memoizedBinarySearch");var Co=class{static{k(this,"TraceMap")}constructor(e,r){let n=typeof e=="string";if(!n&&e._decodedMemo)return e;let i=n?JSON.parse(e):e,{version:s,file:o,names:a,sourceRoot:l,sources:u,sourcesContent:f}=i;this.version=s,this.file=o,this.names=a||[],this.sourceRoot=l,this.sources=u,this.sourcesContent=f,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;let c=wc(l||"",Rm(r));this.resolvedSources=u.map(p=>wc(p||"",c));let{mappings:d}=i;typeof d=="string"?(this._encoded=d,this._decoded=void 0):(this._encoded=void 0,this._decoded=Nm(d,n)),this._decodedMemo=Um(),this._bySources=void 0,this._bySourceMemos=void 0}};function ax(t){return t}k(ax,"cast$2");function Lc(t){var e;return(e=t)._decoded||(e._decoded=vm(t._encoded))}k(Lc,"decodedMappings");function Hm(t,e,r){let n=Lc(t);if(e>=n.length)return null;let i=n[e],s=$m(i,t._decodedMemo,e,r);return s===-1?null:i[s]}k(Hm,"traceSegment");function $m(t,e,r,n,i){let s=qm(t,n,e,r);return Eo&&(s=jm(t,n,s)),s===-1||s===t.length?-1:s}k($m,"traceSegmentInternal");var Ni=class{static{k(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}};function lx(t){return t}k(lx,"cast$1");function Dc(t,e){return t._indexes[e]}k(Dc,"get");function Qn(t,e){let r=Dc(t,e);if(r!==void 0)return r;let{array:n,_indexes:i}=t,s=n.push(e);return i[e]=s-1}k(Qn,"put");function Wm(t,e){let r=Dc(t,e);if(r===void 0)return;let{array:n,_indexes:i}=t;for(let s=r+1;s<n.length;s++){let o=n[s];n[s-1]=o,i[o]--}i[e]=void 0,n.pop()}k(Wm,"remove");var cx=0,ux=1,fx=2,hx=3,dx=4,Km=-1,_c=class{static{k(this,"GenMapping")}constructor({file:e,sourceRoot:r}={}){this._names=new Ni,this._sources=new Ni,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=r,this._ignoreList=new Ni}};function px(t){return t}k(px,"cast");var mx=k((t,e,r,n,i,s,o,a)=>Ym(!0,t,e,r,n,i,s,o),"maybeAddSegment");function Gm(t,e,r){let{_sources:n,_sourcesContent:i}=t,s=Qn(n,e);i[s]=r}k(Gm,"setSourceContent");function Jm(t,e,r=!0){let{_sources:n,_sourcesContent:i,_ignoreList:s}=t,o=Qn(n,e);o===i.length&&(i[o]=null),r?Qn(s,o):Wm(s,o)}k(Jm,"setIgnore");function Pc(t){let{_mappings:e,_sources:r,_sourcesContent:n,_names:i,_ignoreList:s}=t;return Zm(e),{version:3,file:t.file||void 0,names:i.array,sourceRoot:t.sourceRoot||void 0,sources:r.array,sourcesContent:n,mappings:e,ignoreList:s.array}}k(Pc,"toDecodedMap");function Vm(t){let e=Pc(t);return Object.assign(Object.assign({},e),{mappings:Sm(e.mappings)})}k(Vm,"toEncodedMap");function Ym(t,e,r,n,i,s,o,a,l){let{_mappings:u,_sources:f,_sourcesContent:c,_names:d}=e,p=zm(u,r),m=Xm(p,n);if(!i)return eg(p,m)?void 0:vc(p,m,[n]);let g=Qn(f,i),A=a?Qn(d,a):Km;if(g===c.length&&(c[g]=null),!tg(p,m,g,s,o,A))return vc(p,m,a?[n,g,s,o,A]:[n,g,s,o])}k(Ym,"addSegmentInternal");function zm(t,e){for(let r=t.length;r<=e;r++)t[r]=[];return t[e]}k(zm,"getLine");function Xm(t,e){let r=t.length;for(let n=r-1;n>=0;r=n--){let i=t[n];if(e>=i[cx])break}return r}k(Xm,"getColumnIndex");function vc(t,e,r){for(let n=t.length;n>e;n--)t[n]=t[n-1];t[e]=r}k(vc,"insert");function Zm(t){let{length:e}=t,r=e;for(let n=r-1;n>=0&&!(t[n].length>0);r=n,n--);r<e&&(t.length=r)}k(Zm,"removeEmptyFinalLines");function eg(t,e){return e===0?!0:t[e-1].length===1}k(eg,"skipSourceless");function tg(t,e,r,n,i,s){if(e===0)return!1;let o=t[e-1];return o.length===1?!1:r===o[ux]&&n===o[fx]&&i===o[hx]&&s===(o.length===5?o[dx]:Km)}k(tg,"skipSource");var rg=Rc("",-1,-1,"",null,!1),gx=[];function Rc(t,e,r,n,i,s){return{source:t,line:e,column:r,name:n,content:i,ignore:s}}k(Rc,"SegmentObject");function Nc(t,e,r,n,i){return{map:t,sources:e,source:r,content:n,ignore:i}}k(Nc,"Source");function Tc(t,e){return Nc(t,e,"",null,!1)}k(Tc,"MapSource");function ng(t,e,r){return Nc(null,gx,t,e,r)}k(ng,"OriginalSource");function ig(t){let e=new _c({file:t.map.file}),{sources:r,map:n}=t,i=n.names,s=Lc(n);for(let o=0;o<s.length;o++){let a=s[o];for(let l=0;l<a.length;l++){let u=a[l],f=u[0],c=rg;if(u.length!==1){let _=r[u[1]];if(c=Fc(_,u[2],u[3],u.length===5?i[u[4]]:""),c==null)continue}let{column:d,line:p,name:m,content:g,source:A,ignore:y}=c;mx(e,o,f,A,p,d,m),A&&g!=null&&Gm(e,A,g),y&&Jm(e,A,!0)}}return e}k(ig,"traceMappings");function Fc(t,e,r,n){if(!t.map)return Rc(t.source,e,r,n,t.content,t.ignore);let i=Hm(t.map,e,r);return i==null?null:i.length===1?rg:Fc(t.sources[i[1]],i[2],i[3],i.length===5?t.map.names[i[4]]:n)}k(Fc,"originalPositionFor");function sg(t){return Array.isArray(t)?t:[t]}k(sg,"asArray");function og(t,e){let r=sg(t).map(s=>new Co(s,"")),n=r.pop();for(let s=0;s<r.length;s++)if(r[s].sources.length>1)throw new Error(`Transformation map ${s} must have exactly one source file.
|
|
202
|
+
Did you specify these with the most recent transformation maps first?`);let i=Qc(n,e,"",0);for(let s=r.length-1;s>=0;s--)i=Tc(r[s],[i]);return i}k(og,"buildSourceMapTree");function Qc(t,e,r,n){let{resolvedSources:i,sourcesContent:s,ignoreList:o}=t,a=n+1,l=i.map((u,f)=>{let c={importer:r,depth:a,source:u||"",content:void 0,ignore:void 0},d=e(c.source,c),{source:p,content:m,ignore:g}=c;if(d)return Qc(new Co(d,p),e,p,a);let A=m!==void 0?m:s?s[f]:null,y=g!==void 0?g:o?o.includes(f):!1;return ng(p,A,y)});return Tc(t,l)}k(Qc,"build");var Ec=class{static{k(this,"SourceMap")}constructor(e,r){let n=r.decodedMappings?Pc(e):Vm(e);this.version=n.version,this.file=n.file,this.mappings=n.mappings,this.names=n.names,this.ignoreList=n.ignoreList,this.sourceRoot=n.sourceRoot,this.sources=n.sources,r.excludeContent||(this.sourcesContent=n.sourcesContent)}toString(){return JSON.stringify(this)}};function Mc(t,e,r){let n={excludeContent:!!r,decodedMappings:!1},i=og(t,e);return new Ec(ig(i),n)}k(Mc,"remapping");var ag=k((t,e,r)=>{let n=[],i={code:e};for(let s of r){let o=s(t,i.code);o&&(Object.assign(i,o),n.unshift(o.map))}return{...i,map:Mc(n,()=>null)}},"applyTransformersSync"),Ax=k(async(t,e,r)=>{let n=[],i={code:e};for(let s of r){let o=await s(t,i.code);o&&(Object.assign(i,o),n.unshift(o.map))}return{...i,map:Mc(n,()=>null)}},"applyTransformers"),yx=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),wx=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,bx=process.execArgv.some(t=>wx.test(t)),jc={...yx,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||bx,minifyWhitespace:!0,keepNames:!0},Uc=k(t=>{let e=t.sourcefile;if(e){let r=Tn.extname(e.split("?")[0]);r?r===".cts"||r===".mts"?t.sourcefile=`${e.slice(0,-3)}ts`:r===".mjs"&&(t.sourcefile=`${e.slice(0,-3)}js`):t.sourcefile+=".js"}return r=>(r.map&&(t.sourcefile!==e&&(r.map=r.map.replace(JSON.stringify(t.sourcefile),JSON.stringify(e))),r.map=JSON.parse(r.map)),r)},"patchOptions"),qc=k(t=>{throw t.name="TransformError",delete t.errors,delete t.warnings,t},"formatEsbuildError"),_x=k((t,e)=>({...Et(vp)?{dirname:Tn.dirname(t),filename:t}:{},url:e}),"getImportMeta"),Jr=k((t,e,r)=>{let n,i,s;if(e.startsWith("file://")){n=e;let c=new URL(e);i=qC(c)}else[i,s]=e.split("?"),n=HC(i)+(s?`?${s}`:"");let{cjsBanner:o,...a}=r??{},l={...jc,format:"cjs",sourcefile:i,banner:`__filename=${JSON.stringify(i)};(()=>{${o??""}`,footer:"})()",platform:"node",...a};t.includes("import.meta")&&l.format==="cjs"&&!i.endsWith(".cjs")&&!i.endsWith(".cts")&&(l.define={...l.define,"import.meta":JSON.stringify(_x(i,n))});let u=Cc([t,n,JSON.stringify(l),nr.version,Sc].join("-")),f=Fn.get(u);return f||(f=ag(e,t,[(c,d)=>{let p=Uc(l),m;try{m=(0,nr.transformSync)(d,l)}catch(g){throw qc(g)}return p(m)},(c,d)=>Ar(c,d,!0)]),Fn.set(u,f)),f},"transformSync"),Hc=k(async(t,e,r)=>{let n={...jc,format:"esm",sourcefile:e,...r},i=Cc([t,JSON.stringify(n),nr.version,Sc].join("-")),s=Fn.get(i);return s||(s=await Ax(e,t,[async(o,a)=>{let l=Uc(n),u;try{u=await(0,nr.transform)(a,n)}catch(f){throw qc(f)}return l(u)},(o,a)=>Ar(o,a,!0)]),Fn.set(i,s)),s},"transform"),lg=k((t,e,r)=>{let n={...jc,format:"esm",sourcefile:e,...r},i=Cc([t,JSON.stringify(n),nr.version,Sc].join("-")),s=Fn.get(i);return s||(s=ag(e,t,[(o,a)=>{let l=Uc(n),u;try{u=(0,nr.transformSync)(a,n)}catch(f){throw qc(f)}return l(u)},(o,a)=>Ar(o,a,!0)]),Fn.set(i,s)),s},"transformEsmSync");import Ex from"node:net";var vx=Object.defineProperty,$c=(t,e)=>vx(t,"name",{value:e,configurable:!0}),So=[],Cx=$c(()=>new Promise(t=>{let e=Sp(process.ppid),r=Ex.createConnection(e,()=>{t($c(n=>{let i=Buffer.from(JSON.stringify(n)),s=Buffer.alloc(4);s.writeInt32BE(i.length,0),r.write(Buffer.concat([s,i]))},"sendToParent"))});r.on("error",()=>{t()}),r.unref()}),"connectToServer"),yr={send:$c(t=>{So.push(t)},"send")},xx=Cx();xx.then(t=>{if(t)for(let e of So)t(e);So=[],yr.send=t},()=>{So=[],yr.send=void 0});import{inspect as Rx}from"node:util";var Sx=Object.defineProperty,kx=(t,e)=>Sx(t,"name",{value:e,configurable:!0}),Vr=!0,Mn=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{},ko=0;if(Mn.process&&Mn.process.env&&Mn.process.stdout){let{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:r,TERM:n,COLORTERM:i}=Mn.process.env;e||r||t==="0"?Vr=!1:t==="1"||t==="2"||t==="3"?Vr=!0:n==="dumb"?Vr=!1:"CI"in Mn.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in Mn.process.env)?Vr=!0:Vr=process.stdout.isTTY,Vr&&(process.platform==="win32"||i&&(i==="truecolor"||i==="24bit")?ko=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?ko=2:ko=1)}var Fi={enabled:Vr,supportLevel:ko};function Ht(t,e,r=1){let n=`\x1B[${t}m`,i=`\x1B[${e}m`,s=new RegExp(`\\x1b\\[${e}m`,"g");return o=>Fi.enabled&&Fi.supportLevel>=r?n+(""+o).replace(s,n)+i:""+o}kx(Ht,"kolorist");var cg=Ht(30,39),iN=Ht(33,39),sN=Ht(90,39),oN=Ht(92,39),aN=Ht(95,39),lN=Ht(96,39),ug=Ht(44,49),fg=Ht(100,49),hg=Ht(103,49);var Ix=Object.defineProperty,U=(t,e)=>Ix(t,"name",{value:e,configurable:!0}),Dg=U(t=>{if(!t.startsWith("data:text/javascript,"))return;let e=t.indexOf("?");if(e===-1)return;let r=new URLSearchParams(t.slice(e+1)).get("filePath");if(r)return r},"getOriginalFilePath"),su=U(t=>{let e=Dg(t);return e&&(Xe._cache[e]=Xe._cache[t],delete Xe._cache[t],t=e),t},"interopCjsExports"),Pg=U(t=>t!==null&&typeof t=="object","A"),Un=U((t,e)=>Object.assign(new Error(`[${t}]: ${e}`),{code:t}),"a"),Rg="ERR_INVALID_PACKAGE_CONFIG",Xc="ERR_INVALID_PACKAGE_TARGET",Nx="ERR_PACKAGE_PATH_NOT_EXPORTED",Tx=/^\d+$/,Fx=/^(\.{1,2}|node_modules)$/i,Qx=/\/|\\/,Ng=(t=>(t.Export="exports",t.Import="imports",t))(Ng||{}),Zc=U((t,e,r,n,i)=>{if(e==null)return[];if(typeof e=="string"){let[s,...o]=e.split(Qx);if(s===".."||o.some(a=>Fx.test(a)))throw Un(Xc,`Invalid "${t}" target "${e}" defined in the package config`);return[i?e.replace(/\*/g,i):e]}if(Array.isArray(e))return e.flatMap(s=>Zc(t,s,r,n,i));if(Pg(e)){for(let s of Object.keys(e)){if(Tx.test(s))throw Un(Rg,"Cannot contain numeric property keys");if(s==="default"||n.includes(s))return Zc(t,e[s],r,n,i)}return[]}throw Un(Xc,`Invalid "${t}" target "${e}"`)},"f"),Ui="*",Mx=U((t,e)=>{let r=t.indexOf(Ui),n=e.indexOf(Ui);return r===n?e.length>t.length:n>r},"m");function Tg(t,e){if(!e.includes(Ui)&&t.hasOwnProperty(e))return[e];let r,n;for(let i of Object.keys(t))if(i.includes(Ui)){let[s,o,a]=i.split(Ui);if(a===void 0&&e.startsWith(s)&&e.endsWith(o)){let l=e.slice(s.length,-o.length||void 0);l&&(!r||Mx(r,i))&&(r=i,n=l)}}return[r,n]}U(Tg,"d");var jx=U(t=>Object.keys(t).reduce((e,r)=>{let n=r===""||r[0]!==".";if(e===void 0||e===n)return n;throw Un(Rg,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),Ux=/^\w+:/,qx=U((t,e,r)=>{if(!t)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof t=="string"||Array.isArray(t)||Pg(t)&&jx(t))&&(t={".":t});let[n,i]=Tg(t,e),s=Zc(Ng.Export,t[n],e,r,i);if(s.length===0)throw Un(Nx,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(let o of s)if(!o.startsWith("./")&&!Ux.test(o))throw Un(Xc,`Invalid "exports" target "${o}" defined in the package config`);return s},"v"),Hx=Object.defineProperty,T=U((t,e)=>Hx(t,"name",{value:e,configurable:!0}),"i");function Te(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}U(Te,"x"),T(Te,"slash");var $x=T((t,e)=>{let r=`readFileSync:${e}`,n=t?.get(r);return n===void 0&&(n=Xr.readFileSync(e,"utf8"),t?.set(r,n)),n},"readFile"),mt=T((t,e)=>{let r=`tryStat:${e}`,n=t?.get(r);if(n===void 0){try{n=Xr.statSync(e)}catch{n=null}t?.set(r,n)}return n??void 0},"tryStat"),Hi=T((t,e,r)=>{for(;;){let n=G.posix.join(t,e);if(mt(r,n))return n;let i=G.dirname(t);if(i===t)return;t=i}},"findUp");function eu(t,e=!1){let r=t.length,n=0,i="",s=0,o=16,a=0,l=0,u=0,f=0,c=0;function d(b,E){let v=0,C=0;for(;v<b;){let O=t.charCodeAt(n);if(O>=48&&O<=57)C=C*16+O-48;else if(O>=65&&O<=70)C=C*16+O-65+10;else if(O>=97&&O<=102)C=C*16+O-97+10;else break;n++,v++}return v<b&&(C=-1),C}U(d,"A"),T(d,"scanHexDigits");function p(b){n=b,i="",s=0,o=16,c=0}U(p,"O"),T(p,"setPosition");function m(){let b=n;if(t.charCodeAt(n)===48)n++;else for(n++;n<t.length&&wr(t.charCodeAt(n));)n++;if(n<t.length&&t.charCodeAt(n)===46)if(n++,n<t.length&&wr(t.charCodeAt(n)))for(n++;n<t.length&&wr(t.charCodeAt(n));)n++;else return c=3,t.substring(b,n);let E=n;if(n<t.length&&(t.charCodeAt(n)===69||t.charCodeAt(n)===101))if(n++,(n<t.length&&t.charCodeAt(n)===43||t.charCodeAt(n)===45)&&n++,n<t.length&&wr(t.charCodeAt(n))){for(n++;n<t.length&&wr(t.charCodeAt(n));)n++;E=n}else c=3;return t.substring(b,E)}U(m,"h"),T(m,"scanNumber");function g(){let b="",E=n;for(;;){if(n>=r){b+=t.substring(E,n),c=2;break}let v=t.charCodeAt(n);if(v===34){b+=t.substring(E,n),n++;break}if(v===92){if(b+=t.substring(E,n),n++,n>=r){c=2;break}switch(t.charCodeAt(n++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=`
|
|
203
|
+
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:let C=d(4);C>=0?b+=String.fromCharCode(C):c=4;break;default:c=5}E=n;continue}if(v>=0&&v<=31)if(zr(v)){b+=t.substring(E,n),c=2;break}else c=6;n++}return b}U(g,"D"),T(g,"scanString");function A(){if(i="",c=0,s=n,l=a,f=u,n>=r)return s=r,o=17;let b=t.charCodeAt(n);if(qi(b)){do n++,i+=String.fromCharCode(b),b=t.charCodeAt(n);while(qi(b));return o=15}if(zr(b))return n++,i+=String.fromCharCode(b),b===13&&t.charCodeAt(n)===10&&(n++,i+=`
|
|
204
|
+
`),a++,u=n,o=14;switch(b){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,i=g(),o=10;case 47:let E=n-1;if(t.charCodeAt(n+1)===47){for(n+=2;n<r&&!zr(t.charCodeAt(n));)n++;return i=t.substring(E,n),o=12}if(t.charCodeAt(n+1)===42){n+=2;let v=r-1,C=!1;for(;n<v;){let O=t.charCodeAt(n);if(O===42&&t.charCodeAt(n+1)===47){n+=2,C=!0;break}n++,zr(O)&&(O===13&&t.charCodeAt(n)===10&&n++,a++,u=n)}return C||(n++,c=1),i=t.substring(E,n),o=13}return i+=String.fromCharCode(b),n++,o=16;case 45:if(i+=String.fromCharCode(b),n++,n===r||!wr(t.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;n<r&&y(b);)n++,b=t.charCodeAt(n);if(s!==n){switch(i=t.substring(s,n),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(b),n++,o=16}}U(A,"c"),T(A,"scanNext");function y(b){if(qi(b)||zr(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}U(y,"p"),T(y,"isUnknownContentCharacter");function _(){let b;do b=A();while(b>=12&&b<=15);return b}return U(_,"b"),T(_,"scanNextNonTrivia"),{setPosition:p,getPosition:T(()=>n,"getPosition"),scan:e?_:A,getToken:T(()=>o,"getToken"),getTokenValue:T(()=>i,"getTokenValue"),getTokenOffset:T(()=>s,"getTokenOffset"),getTokenLength:T(()=>n-s,"getTokenLength"),getTokenStartLine:T(()=>l,"getTokenStartLine"),getTokenStartCharacter:T(()=>s-f,"getTokenStartCharacter"),getTokenError:T(()=>c,"getTokenError")}}U(eu,"Ne"),T(eu,"createScanner");function qi(t){return t===32||t===9}U(qi,"X"),T(qi,"isWhiteSpace");function zr(t){return t===10||t===13}U(zr,"P"),T(zr,"isLineBreak");function wr(t){return t>=48&&t<=57}U(wr,"S"),T(wr,"isDigit");var dg;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(dg||(dg={})),new Array(20).fill(0).map((t,e)=>" ".repeat(e));var jn=200;new Array(jn).fill(0).map((t,e)=>`
|
|
205
|
+
`+" ".repeat(e)),new Array(jn).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(jn).fill(0).map((t,e)=>`\r
|
|
206
|
+
`+" ".repeat(e)),new Array(jn).fill(0).map((t,e)=>`
|
|
207
|
+
`+" ".repeat(e)),new Array(jn).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(jn).fill(0).map((t,e)=>`\r
|
|
208
|
+
`+" ".repeat(e));var Po;(function(t){t.DEFAULT={allowTrailingComma:!1}})(Po||(Po={}));function tu(t,e=[],r=Po.DEFAULT){let n=null,i=[],s=[];function o(a){Array.isArray(i)?i.push(a):n!==null&&(i[n]=a)}return U(o,"l"),T(o,"onValue"),ru(t,{onObjectBegin:T(()=>{let a={};o(a),s.push(i),i=a,n=null},"onObjectBegin"),onObjectProperty:T(a=>{n=a},"onObjectProperty"),onObjectEnd:T(()=>{i=s.pop()},"onObjectEnd"),onArrayBegin:T(()=>{let a=[];o(a),s.push(i),i=a,n=null},"onArrayBegin"),onArrayEnd:T(()=>{i=s.pop()},"onArrayEnd"),onLiteralValue:o,onError:T((a,l,u)=>{e.push({error:a,offset:l,length:u})},"onError")},r),i[0]}U(tu,"Re"),T(tu,"parse$1");function ru(t,e,r=Po.DEFAULT){let n=eu(t,!1),i=[],s=0;function o(D){return D?()=>s===0&&D(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}U(o,"l"),T(o,"toNoArgVisit");function a(D){return D?j=>s===0&&D(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}U(a,"g"),T(a,"toOneArgVisit");function l(D){return D?j=>s===0&&D(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}U(l,"m"),T(l,"toOneArgVisitWithPath");function u(D){return D?()=>{s>0?s++:D(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}U(u,"k"),T(u,"toBeginVisit");function f(D){return D?()=>{s>0&&s--,s===0&&D(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}U(f,"w"),T(f,"toEndVisit");let c=u(e.onObjectBegin),d=l(e.onObjectProperty),p=f(e.onObjectEnd),m=u(e.onArrayBegin),g=f(e.onArrayEnd),A=l(e.onLiteralValue),y=a(e.onSeparator),_=o(e.onComment),b=a(e.onError),E=r&&r.disallowComments,v=r&&r.allowTrailingComma;function C(){for(;;){let D=n.scan();switch(n.getTokenError()){case 4:O(14);break;case 5:O(15);break;case 3:O(13);break;case 1:E||O(11);break;case 2:O(12);break;case 6:O(16);break}switch(D){case 12:case 13:E?O(10):_();break;case 16:O(1);break;case 15:case 14:break;default:return D}}}U(C,"v"),T(C,"scanNext");function O(D,j=[],K=[]){if(b(D),j.length+K.length>0){let H=n.getToken();for(;H!==17;){if(j.indexOf(H)!==-1){C();break}else if(K.indexOf(H)!==-1)break;H=C()}}}U(O,"d"),T(O,"handleError");function M(D){let j=n.getTokenValue();return D?A(j):(d(j),i.push(j)),C(),!0}U(M,"L"),T(M,"parseString");function q(){switch(n.getToken()){case 11:let D=n.getTokenValue(),j=Number(D);isNaN(j)&&(O(2),j=0),A(j);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return C(),!0}U(q,"B"),T(q,"parseLiteral");function F(){return n.getToken()!==10?(O(3,[],[2,5]),!1):(M(!1),n.getToken()===6?(y(":"),C(),L()||O(4,[],[2,5])):O(5,[],[2,5]),i.pop(),!0)}U(F,"$"),T(F,"parseProperty");function B(){c(),C();let D=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(D||O(4,[],[]),y(","),C(),n.getToken()===2&&v)break}else D&&O(6,[],[]);F()||O(4,[],[2,5]),D=!0}return p(),n.getToken()!==2?O(7,[2],[]):C(),!0}U(B,"N"),T(B,"parseObject");function P(){m(),C();let D=!0,j=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(j||O(4,[],[]),y(","),C(),n.getToken()===4&&v)break}else j&&O(6,[],[]);D?(i.push(0),D=!1):i[i.length-1]++,L()||O(4,[],[4,5]),j=!0}return g(),D||i.pop(),n.getToken()!==4?O(8,[4],[]):C(),!0}U(P,"$e"),T(P,"parseArray");function L(){switch(n.getToken()){case 3:return P();case 1:return B();case 10:return M(!0);default:return q()}}return U(L,"H"),T(L,"parseValue"),C(),n.getToken()===17?r.allowEmptyContent?!0:(O(4,[],[]),!1):L()?(n.getToken()!==17&&O(9,[],[]),!0):(O(4,[],[]),!1)}U(ru,"Pe"),T(ru,"visit");var pg;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(pg||(pg={}));var mg;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(mg||(mg={}));var Wx=tu,gg;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(gg||(gg={}));var ou=T((t,e)=>Wx($x(e,t)),"readJsonc"),Fg=T(()=>{let{findPnpApi:t}=Xe;return t&&t(process.cwd())},"getPnpApi"),Kx="detectTypeScriptVersion:",Gx=T((t,e)=>{let r=`${Kx}${t}`,n=e?.get(r);if(n!==void 0)return n??void 0;let i,s=Fg();if(s)try{i=s.resolveRequest("typescript/package.json",t)??void 0}catch{}i??=Hi(G.resolve(t),G.join("node_modules","typescript","package.json"),e);let o;if(i)try{let a=ou(i,e);typeof a?.version=="string"&&(o=a.version)}catch{}return e?.set(r,o??null),o},"detectTypeScriptVersion"),Yr="package.json",Lo="tsconfig.json",Jx=T((t,e,r)=>{let n=Xe.createRequire(G.join(r,"tsconfig.json"));if(t!==e)try{return n.resolve(t)}catch{}try{return n.resolve(e)}catch{}try{return n.resolve(`${e}/${Yr}`)}catch{}},"resolvePackageEntryWithNode"),Wc=T((t,e,r,n)=>{let i=`resolveFromPackageJsonPath:${t}:${e}:${r}`;if(n?.has(i))return n.get(i)||!1;let s=ou(t,n);if(!s)return;let o=e||Lo;if(!r&&s.exports)try{let[a]=qx(s.exports,e,["require","types"]);o=a}catch{return n?.set(i,""),!1}else!e&&s.tsconfig&&(o=s.tsconfig);return o=G.join(t,"..",o),n?.set(i,o),o},"resolveFromPackageJsonPath"),Vx=T((t,e,r)=>{let n=`resolveExtendsPath:${t}:${e}`;if(r?.has(n))return r.get(n)||void 0;let i=Yx(t,e,r);return r?.set(n,i||""),i},"resolveExtendsPath"),Yx=T((t,e,r)=>{let n=t;if(t===".."&&(n=G.join(n,Lo)),t[0]==="."&&(n=G.resolve(e,n)),G.isAbsolute(n)){let A=mt(r,n);if(A){if(A.isFile())return n}else if(!n.endsWith(".json")){let y=`${n}.json`;if(mt(r,y))return y}return}let[i,...s]=t.split("/"),o=i[0]==="@"?`${i}/${s.shift()}`:i,a=s.join("/"),l=Fg();if(l){let{resolveRequest:A}=l;try{if(o===t){let y=A(G.join(o,Yr),e);if(y){let _=Wc(y,a,!1,r);if(_&&mt(r,_))return _}}else{let y;try{y=A(t,e,{extensions:[".json"]})}catch{y=A(G.join(t,Lo),e)}if(y)return y}}catch{}}let u=Jx(t,o,e),f;if(u){if(G.basename(u)!==Yr&&u.endsWith(".json"))return u;f=G.basename(u)===Yr?u:Hi(G.dirname(u),Yr,r)}let c=f&&G.dirname(f)||Hi(G.resolve(e),G.join("node_modules",o),r);if(!c||!mt(r,c)?.isDirectory())return;let d=G.join(c,Yr);if(mt(r,d)){let A=Wc(d,a,!1,r);if(A===!1)return;if(A&&mt(r,A)?.isFile())return A}let p=G.join(c,a),m=p.endsWith(".json");if(!m){let A=`${p}.json`;if(mt(r,A))return A}let g=mt(r,p);if(g){if(g.isDirectory()){let A=G.join(p,Yr);if(mt(r,A)){let _=Wc(A,"",!0,r);if(_&&mt(r,_))return _}let y=G.join(p,Lo);if(mt(r,y))return y}else if(m)return p}},"resolveExtendsPathUncached"),nu=Symbol("implicitBaseUrl"),br="${configDir}",au=/^\.{1,2}(\/.*)?$/,Do=T(t=>{let e=Te(t);return au.test(e)?e:`./${e}`},"normalizeRelativePath"),zx=T(t=>{let e={...t};if(e.strict){let r=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(let n of r)e[n]===void 0&&(e[n]=!0)}if(e.composite&&(e.declaration??=!0,e.incremental??=!0),e.target){let r=e.target.toLowerCase();r==="es2015"&&(r="es6"),e.target=r,r==="esnext"&&(e.module??="es6",e.useDefineForClassFields??=!0),(r==="es6"||r==="es2016"||r==="es2017"||r==="es2018"||r==="es2019"||r==="es2020"||r==="es2021"||r==="es2022"||r==="es2023"||r==="es2024"||r==="es2025")&&(e.module??="es6"),(r==="es2022"||r==="es2023"||r==="es2024"||r==="es2025")&&(e.useDefineForClassFields??=!0)}if(e.module){let r=e.module.toLowerCase();if(r==="es2015"&&(r="es6"),e.module=r,(r==="es6"||r==="es2020"||r==="es2022"||r==="esnext"||r==="none"||r==="system"||r==="umd"||r==="amd")&&(e.moduleResolution??="classic"),r==="system"&&(e.allowSyntheticDefaultImports??=!0),(r==="node16"||r==="node18"||r==="node20"||r==="nodenext"||r==="preserve")&&(e.esModuleInterop??=!0,e.allowSyntheticDefaultImports??=!0),(r==="node16"||r==="node18"||r==="node20"||r==="nodenext")&&(e.moduleDetection??="force"),(r==="node16"||r==="node18")&&(e.target??="es2022",e.moduleResolution??="node16"),r==="node20"&&(e.target??="es2023",e.moduleResolution??="node16",e.resolveJsonModule??=!0),r==="nodenext"&&(e.target??="esnext",e.moduleResolution??="nodenext",e.resolveJsonModule??=!0),r==="node16"||r==="node18"||r==="node20"||r==="nodenext"){let n=e.target;(n==="es3"||n==="es2022"||n==="es2023"||n==="es2024"||n==="esnext")&&(e.useDefineForClassFields??=!0)}r==="preserve"&&(e.moduleResolution??="bundler")}if(e.moduleResolution){let r=e.moduleResolution.toLowerCase();r==="node"&&(r="node10"),e.moduleResolution=r,(r==="node16"||r==="nodenext"||r==="bundler")&&(e.resolvePackageJsonExports??=!0,e.resolvePackageJsonImports??=!0),r==="bundler"&&(e.allowSyntheticDefaultImports??=!0,e.resolveJsonModule??=!0)}for(let r of["jsx","moduleDetection","importsNotUsedAsValues","newLine"])e[r]&&(e[r]=e[r].toLowerCase());return e.esModuleInterop&&(e.allowSyntheticDefaultImports??=!0),e.verbatimModuleSyntax&&(e.isolatedModules??=!0,e.preserveConstEnums??=!0),e.isolatedModules&&(e.preserveConstEnums??=!0),e.rewriteRelativeImportExtensions&&(e.allowImportingTsExtensions??=!0),e.lib&&(e.lib=e.lib.map(r=>r.toLowerCase())),e.checkJs&&(e.allowJs??=!0),e},"normalizeCompilerOptions"),Xx=T((t,e)=>{!e.has("target")&&!Zx(t.module)&&(t.target="es3")},"applyV4Defaults"),Zx=T(t=>t==="node16"||t==="node18"||t==="node20"||t==="nodenext","moduleDictatesTarget$1"),eS=T((t,e)=>{!e.has("target")&&!tS(t.module)&&(t.target="es5")},"applyV5Defaults"),tS=T(t=>t==="node16"||t==="node18"||t==="node20"||t==="nodenext","moduleDictatesTarget"),rS=T((t,e)=>{e.has("strict")||(t.strict=!0),e.has("target")||(t.target="es2025"),e.has("module")||(t.module="es2022"),e.has("moduleResolution")||(t.moduleResolution="bundler"),e.has("rootDir")||(t.rootDir="."),e.has("types")||(t.types=[]),e.has("noUncheckedSideEffectImports")||(t.noUncheckedSideEffectImports=!0),e.has("libReplacement")||(t.libReplacement=!1)},"applyV6Defaults"),nS=[[4,Xx],[5,eS],[6,rS]],iS=T(t=>{let e=/^v?(\d+)/.exec(t);return e?Number(e[1]):void 0},"parseMajor"),sS=T((t,e)=>{let r=iS(e);if(r===void 0)return;let n=new Set(Object.keys(t));for(let[i,s]of nS)i<=r&&s(t,n)},"applyVersionDefaults"),Kc=T((t,e)=>Do(G.relative(t,e)),"pathRelative"),Ag=["files","include","exclude"],yg=T((t,e,r)=>{let n=G.join(e,r),i=G.relative(t,n);return Te(i)||"./"},"resolveAndRelativize"),oS=T((t,e,r)=>{let n=G.relative(t,e);if(!n)return r;let i=r.startsWith("./")?r.slice(2):r;return Te(`${n}/${i}`)},"prefixPattern"),wg=["outDir","declarationDir"],Io=T((t,e)=>{if(t.startsWith(br))return Te(G.join(e,t.slice(br.length)))},"interpolateConfigDir"),aS=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],lS=T((t,e={})=>{if(t.length===0)throw new Error("Chain must not be empty");let{typescriptVersion:r}=e,n=new Map(t.map(c=>[c.path,c])),i=new Map,s=T(c=>{let d=i.get(c);if(d)return d;let p=n.get(c);if(!p)throw new Error(`Config not found in chain: ${c}`);let m=p.config,g=G.dirname(c),A={...m,...m.compilerOptions&&{compilerOptions:{...m.compilerOptions}},...m.watchOptions&&{watchOptions:{...m.watchOptions}}};if(delete A.extends,A.compilerOptions?.paths&&!A.compilerOptions.baseUrl&&(A.compilerOptions[nu]=g),m.extends){let y=Array.isArray(m.extends)?m.extends:[m.extends];for(let _ of y.toReversed()){let b=s(_),E=G.dirname(_),{references:v,...C}=b;if(C.compilerOptions){let M={...C.compilerOptions};for(let q of["baseUrl","outDir","declarationDir","rootDir"]){let F=M[q];F&&!F.startsWith(br)&&(M[q]=yg(g,E,F))}for(let q of["rootDirs","typeRoots"]){let F=M[q];F&&(M[q]=F.map(B=>B.startsWith(br)?B:yg(g,E,B)))}C.compilerOptions=M}for(let M of Ag){let q=C[M];q&&(C[M]=q.map(F=>F.startsWith(br)?F:oS(g,E,F)))}let O={...C,...A,compilerOptions:{...C.compilerOptions,...A.compilerOptions}};C.watchOptions&&(O.watchOptions={...C.watchOptions,...A.watchOptions}),A=O}}if(A.compilerOptions){let{compilerOptions:y}=A,_=["baseUrl","rootDir"];for(let b of _){let E=y[b];if(E&&!E.startsWith(br)){let v=G.resolve(g,E),C=Kc(g,v);y[b]=C}}for(let b of wg){let E=y[b];E&&(Array.isArray(A.exclude)||(A.exclude=wg.map(v=>y[v]).filter(Boolean)),E.startsWith(br)||(E=Do(E)),y[b]=E)}}else A.compilerOptions={};if(A.include&&(A.include=A.include.map(Te)),A.files&&(A.files=A.files.map(y=>y.startsWith(br)?y:Do(y))),A.watchOptions){let{watchOptions:y}=A;for(let _ of["excludeDirectories","excludeFiles"])y[_]&&(y[_]=y[_].map(b=>Te(G.resolve(g,b))));for(let _ of["watchFile","watchDirectory","fallbackPolling"])if(y[_]){let b=y;b[_]=y[_].toLowerCase()}}return i.set(c,A),A},"resolveEntry"),o=t[0],a=s(o.path),l=G.dirname(o.path),u={...a,compilerOptions:a.compilerOptions?{...a.compilerOptions}:{}},{compilerOptions:f}=u;if(f){for(let c of aS){let d=f[c];if(d){let p=Io(d,l);f[c]=p?Kc(l,p):d}}for(let c of["rootDirs","typeRoots"]){let d=f[c];d&&(f[c]=d.map(p=>{let m=Io(p,l);return m?Kc(l,m):Do(p)}))}if(f.paths){let c={};for(let[d,p]of Object.entries(f.paths))c[d]=p.map(m=>Io(m,l)??m);f.paths=c}r&&sS(f,r),u.compilerOptions=zx(f)}for(let c of Ag){let d=u[c];d&&(u[c]=d.map(p=>Io(p,l)??p))}return{path:o.path,config:u,sources:t.map(c=>c.path)}},"resolveExtendsChain"),cS=T((t,e={})=>{let{cache:r=new Map}=e,n=G.resolve(t),i=[],s=new Set,o=T((a,l)=>{let u=Te(a);if(s.has(u))return;s.add(u);let f;try{f=ou(a,r)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${a}`)}if(typeof f!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${a}`);let c=G.dirname(a);if(f.extends){let d=Array.isArray(f.extends),p=(d?f.extends:[f.extends]).map(g=>{let A=Vx(g,c,r);if(!A)throw new Error(`File '${g}' not found.`);let y=Te(A);if(l.has(y)||y===u)throw new Error(`Circularity detected while resolving configuration: ${y}`);return y});f.extends=d?p:p[0],i.push({path:u,config:f});let m=new Set(l);m.add(u);for(let g of[...p].reverse())o(g,m)}else i.push({path:u,config:f})},"collect");return o(n,new Set),i},"getExtendsChain"),lu=T((t,e={})=>{let{cache:r=new Map,typescriptVersion:n="auto"}=e,i=cS(t,{cache:r}),s;return n==="auto"?s=Gx(G.dirname(i[0].path),r):n!==!1&&(s=n),lS(i,{typescriptVersion:s})},"readTsconfig"),uS=Object.defineProperty,No=T((t,e)=>uS(t,"name",{value:e,configurable:!0}),"s"),Qg=No(t=>{let e="";for(let r=0;r<t.length;r+=1){let n=t[r],i=n.toUpperCase();e+=n===i?n.toLowerCase():i}return e},"invertCase"),Gc=new Map,bg=No((t,e)=>{let r=Px.join(t,`.is-fs-case-sensitive-test-${process.pid}`);try{return e.writeFileSync(r,""),!e.existsSync(Qg(r))}finally{try{e.unlinkSync(r)}catch{}}},"checkDirectoryCaseWithWrite"),fS=No((t,e,r)=>{try{return bg(t,r)}catch(n){if(e===void 0)return bg(Dx.tmpdir(),r);throw n}},"checkDirectoryCaseWithFallback"),hS=No((t,e=Lx,r=!0)=>{let n=t??process.cwd();if(r&&Gc.has(n))return Gc.get(n);let i,s=Qg(n);return s!==n&&e.existsSync(n)?i=!e.existsSync(s):i=fS(n,t,e),r&&Gc.set(n,i),i},"isFsCaseSensitive"),{join:_g}=G.posix,Jc={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},dS=T(t=>{let e=[...Jc.ts],r=[...Jc.cts],n=[...Jc.mts];return t?.allowJs&&(e.push(".js",".jsx"),r.push(".cjs"),n.push(".mjs")),[...e,...r,...n]},"getSupportedExtensions"),pS=T(t=>{let e=[];if(!t)return e;let{outDir:r,declarationDir:n}=t;return r&&e.push(r),n&&e.push(n),e},"getDefaultExcludeSpec"),vg=T(t=>t.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),mS=["node_modules","bower_components","jspm_packages"],Vc=`(?!(${mS.join("|")})(/|$))`,gS=/(?:^|\/)[^.*?]+$/,Eg="**/*",Oo="[^/]",Yc="[^./]",Mg=process.platform==="win32",AS=T(({config:t,path:e},r)=>{if("extends"in t)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or readTsconfig to resolve it.");if(!G.isAbsolute(e))throw new Error("The tsconfig path must be absolute");Mg&&(e=Te(e));let n=G.dirname(e),{files:i,include:s,exclude:o,compilerOptions:a}=t,l=T(g=>G.isAbsolute(g)?g:_g(n,g),"resolvePattern"),u=i?new Set(i.map(l)):void 0,f=dS(a),c=r?"":"i",d=(o||pS(a)).map(g=>{let A=l(g),y=vg(A).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${Oo}*`).replaceAll(String.raw`\?`,Oo);return new RegExp(`^${y}($|/)`,c)}),p=i||s?s:[Eg],m=p?p.map(g=>{let A=l(g);gS.test(A)&&(A=_g(A,Eg));let y=vg(A).replaceAll(String.raw`/\*\*`,`(/${Vc}${Yc}${Oo}*)*?`).replaceAll(/(\/)?\\\*/g,(_,b)=>{let E=String.raw`(${Yc}|(\.(?!min\.js$))?)*`;return b?`/${Vc}${Yc}${E}`:E}).replaceAll(/(\/)?\\\?/g,(_,b)=>{let E=Oo;return b?`/${Vc}${E}`:E});return new RegExp(`^${y}$`,c)}):void 0;return{filesSet:u,extensions:f,excludePatterns:d,includePatterns:m}},"compilePatterns"),Cg=new WeakMap,To=T((t,e)=>{if(!G.isAbsolute(e))return!1;Mg&&(e=Te(e));let r=Cg.get(t);r||(r=AS(t,hS()),Cg.set(t,r));let{filesSet:n,extensions:i,excludePatterns:s,includePatterns:o}=r;return n?.has(e)?!0:!i.some(a=>e.endsWith(a))||s.some(a=>a.test(e))?!1:!!(o&&o.some(a=>a.test(e)))},"isFileIncluded"),jg=T((t,e,r,n)=>{let i=G.resolve(t),s=Te(t);for(;;){let o=Hi(s,e,r);if(!o)return;let a=G.resolve(o),l=lu(a,{cache:r,typescriptVersion:n});if(To(l,i))return l;let u=G.dirname(o),f=G.dirname(u);if(f===u)return;s=f}},"findConfigApplicable"),yS=T((t=process.cwd(),e={})=>{let{configName:r="tsconfig.json",cache:n=new Map,includes:i=!1}=e;if(!i){let s=G.resolve(t);return G.basename(s)===r&&mt(n,s)?.isFile()?Te(s):Hi(Te(t),r,n)}return jg(t,r,n,!1)?.path},"findTsconfig"),wS=T((t=process.cwd(),e={})=>{let{configName:r="tsconfig.json",cache:n=new Map,includes:i=!1,typescriptVersion:s="auto"}=e;if(!i){let o=yS(t,{configName:r,cache:n});return o?lu(o,{cache:n,typescriptVersion:s}):void 0}return jg(t,r,n,s)},"getTsconfig"),bS=/\*/g,xg=T((t,e)=>{let r=t.match(bS);if(r&&r.length>1)throw new Error(e)},"assertStarCount"),_S=T(t=>{if(t.includes("*")){let[e,r]=t.split("*");return{prefix:e,suffix:r}}return t},"parsePattern"),vS=T(({prefix:t,suffix:e},r)=>r.startsWith(t)&&r.endsWith(e),"isPatternMatch"),ES=T((t,e,r)=>Object.entries(t).map(([n,i])=>(xg(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:_S(n),substitutions:i.map(s=>{if(xg(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!e&&!au.test(s)&&!G.isAbsolute(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return G.resolve(r,s)})})),"parsePaths"),CS=T(t=>{let{compilerOptions:e}=t.config;if(!e)return null;let{baseUrl:r,paths:n}=e;if(!r&&!n)return null;let i=nu in e&&e[nu],s=G.resolve(G.dirname(t.path),r||i||"."),o=n?ES(n,r,s):[],a=new Map,l=[];for(let u of o)typeof u.pattern=="string"?a.set(u.pattern,u.substitutions):l.push(u);return{exactEntries:a,patternEntries:l,resolvedBaseUrl:s,baseUrl:r}},"compilePaths"),Sg=new WeakMap,Fo=T((t,e)=>{let r=Sg.get(t);if(r===void 0&&(r=CS(t),Sg.set(t,r)),!r)return[];if(au.test(e))return[];let{exactEntries:n,patternEntries:i,resolvedBaseUrl:s,baseUrl:o}=r,a=n.get(e);if(a)return a.map(Te);let l,u=-1;for(let c of i)vS(c.pattern,e)&&c.pattern.prefix.length>u&&(u=c.pattern.prefix.length,l=c);if(!l)return o?[Te(G.join(s,e))]:[];let f=e.slice(l.pattern.prefix.length,e.length-l.pattern.suffix.length);return l.substitutions.map(c=>Te(c.replace("*",f)))},"resolvePathAlias"),Qo=U(t=>{if(t)return lu(t);try{return wS()??void 0}catch{}},"loadTsconfig"),xS=`
|
|
209
|
+
//# sourceMappingURL=data:application/json;base64,`,kg=U(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),St=U(({code:t,map:e})=>t+xS+Buffer.from(JSON.stringify(e),"utf8").toString("base64"),"inlineSourceMap"),Qi=Symbol.for("tsx:global-cjs-loader-count"),Mi=globalThis,Mo=U(()=>(Mi[Qi]??0)>0,"isGlobalCjsLoaderActive"),SS=U(()=>(Mi[Qi]=(Mi[Qi]??0)+1,()=>{Mi[Qi]=Math.max((Mi[Qi]??1)-1,0)}),"activateGlobalCjsLoader"),$n=U(t=>t[0]==="."&&(t[1]==="/"||t[1]==="."||t[2]==="/"),"isRelativePath"),qn=U(t=>$n(t)||G.isAbsolute(t),"isFilePath"),ct="file://",cu=[".ts",".tsx",".jsx",".mts",".cts"],Cr=/\.([cm]?ts|[tj]sx)($|\?)/,jo=/\.(?:ts|tsx|jsx)($|\?)/,Ug=/[/\\].+\.(?:cts|cjs)(?:$|\?)/,qg=/\.json($|\?)/,vr=/\/(?:$|\?)/,Hg=/^(?:@[^/]+\/)?[^/\\]+$/,$g=`${G.sep}node_modules${G.sep}`,Er=Number(process.env.TSX_DEBUG);Er&&(Fi.enabled=!0,Fi.supportLevel=3);var Wg=U(t=>(e,...r)=>{if(!Er||e>Er)return;let n=`${fg(` tsx P${process.pid} `)} ${t}`,i=r.map(s=>typeof s=="string"?s:Rx(s,{colors:!0})).join(" ");Bx(1,`${n} ${i}
|
|
210
|
+
`)},"createLog"),Hn=Wg(hg(cg(" CJS "))),ae=Wg(ug(" ESM ")),_r=new Map,kS=U(async t=>{if(_r.has(t))return _r.get(t);if(!await Xr.promises.access(t).then(()=>!0,()=>!1)){_r.set(t,void 0);return}let e=await Xr.promises.readFile(t,"utf8");try{let r=JSON.parse(e);return _r.set(t,r),r}catch{throw new Error(`Error parsing: ${t}`)}},"readPackageJson"),IS=U(t=>{if(_r.has(t))return _r.get(t);if(!Xr.existsSync(t)){_r.set(t,void 0);return}let e=Xr.readFileSync(t,"utf8");try{let r=JSON.parse(e);return _r.set(t,r),r}catch{throw new Error(`Error parsing: ${t}`)}},"readPackageJsonSync"),OS=U(async t=>{let e=new URL("package.json",t);for(;!e.pathname.endsWith("/node_modules/package.json");){let r=Ro(e),n=await kS(r);if(n)return n;let i=e;if(e=new URL("../package.json",e),e.pathname===i.pathname)break}},"findPackageJson"),Kg=U(t=>{let e=new URL("package.json",t);for(;!e.pathname.endsWith("/node_modules/package.json");){let r=Ro(e),n=IS(r);if(n)return n;let i=e;if(e=new URL("../package.json",e),e.pathname===i.pathname)break}},"findPackageJsonSync"),Gg=U(async t=>(await OS(t))?.type??"commonjs","getPackageType"),Jg=U(t=>Kg(t)?.type??"commonjs","getPackageTypeSync"),BS=U(t=>Kg(t)?.type,"getNearestPackageTypeSync"),Vg=[".js",".json"],Yg=[".ts",".tsx",".jsx"],LS=[...Yg,...Vg],DS=[...Vg,...Yg],ji=Object.create(null);ji[".js"]=[".ts",".tsx",".js",".jsx"],ji[".jsx"]=[".tsx",".ts",".jsx",".js"],ji[".cjs"]=[".cts"],ji[".mjs"]=[".mts"];var Uo=U(t=>{let e=t.split("?"),r=e[1]?`?${e[1]}`:"",[n]=e,i=G.extname(n),s=[],o=ji[i];if(o){let l=n.slice(0,-i.length);s.push(...o.map(u=>l+u+r))}let a=!(t.startsWith(ct)||qn(n))||n.includes($g)||n.includes("/node_modules/")?DS:LS;return s.push(...a.map(l=>n+l+r)),s},"mapTsExtensions"),iu=U(t=>Array.from(t).length>0?`?${t.toString()}`:"","urlSearchParamsStringify"),PS=[".cts",".mts",".ts",".tsx",".jsx"],RS=[".js",".cjs",".mjs"],Ig=[".ts",".tsx",".jsx"],Og="module.exports",NS=U(t=>{let e=G.extname(t);return e===".mjs"||e===".mts"||(e===".js"||e===".ts")&&BS(Ox(t).toString())!=="commonjs"},"isRequireEsmCandidate"),zc=U((t,e,r,n)=>{let i=Object.getOwnPropertyDescriptor(t,e);i?.set?t[e]=r:(!i||i.configurable)&&Object.defineProperty(t,e,{value:r,enumerable:i?.enumerable||n?.enumerable,writable:n?.writable??(i?i.writable:!0),configurable:n?.configurable??(i?i.configurable:!0)})},"safeSet"),TS=U((t,e,r,n)=>{let i=e[".js"],s=Et(Ep),o=U((a,l)=>{if(t.enabled===!1)return i(a,l);let[u,f]=l.split("?");if((new URLSearchParams(f).get("namespace")??void 0)!==n)return i(a,l);Hn(2,"load",{filePath:l}),a.id.startsWith("data:text/javascript,")&&(a.path=G.dirname(u)),yr?.send&&yr.send({type:"dependency",path:u});let c=PS.some(y=>u.endsWith(y)),d=RS.some(y=>u.endsWith(y));if(!c&&!d)return i(a,u);let p=Xr.readFileSync(u,"utf8"),m=d&&!u.endsWith(".cjs")&&!u.endsWith(".cts")&&Ti(p),g=(c||m)&&r&&To(r,u)?r.config:void 0;if(u.endsWith(".cjs")){let y=Ar(l,p);y&&(p=kg()?St(y):y.code)}else if(c||m){let y=Jr(p,l,{tsconfigRaw:g});p=kg()?St(y):y.code}Hn(1,"loaded",{filePath:u}),a._compile(p,u),f&&Xe._cache[u]===a&&(Xe._cache[l]=a,delete Xe._cache[u]);let{exports:A}=a;(s&&A&&(typeof A=="object"||typeof A=="function")?Object.getOwnPropertyDescriptor(A,Og):void 0)?.get&&NS(u)&&(a.exports=A[Og])},"transformer");zc(e,".js",o);for(let a of Ig)zc(e,a,o,{enumerable:!n,writable:!0,configurable:!0});return zc(e,".mjs",o,{writable:!0,configurable:!0}),()=>{e[".js"]===o&&(e[".js"]=i);for(let a of[...Ig,".mjs"])e[a]===o&&delete e[a]}},"createExtensions"),FS=U(t=>e=>{if((e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),vr.test(e)){let r=G.join(e,"index");e.startsWith("./")&&(r=`./${r}`);try{return t(r)}catch{}}try{return t(e)}catch(r){let n=r;if(n.code==="MODULE_NOT_FOUND")try{return t(`${e}${G.sep}index`)}catch{}throw n}},"createImplicitResolver"),Bo=U((t,e,r,n)=>{if(Hn(3,"resolveTsFilename",{request:e,isDirectory:vr.test(e),isTsParent:r,allowJs:n}),vr.test(e)||!r&&!n)return;let i=Uo(e);if(i)for(let s of i)try{return t(s)}catch(o){let{code:a}=o;if(a!=="MODULE_NOT_FOUND"&&a!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw o}},"resolveTsFilename"),QS=U((t,e,r)=>n=>{if(Hn(3,"resolveTsFilename",{request:n,isTsParent:e,isFilePath:qn(n)}),qn(n)){let i=Bo(t,n,e,r);if(i)return i}try{return t(n)}catch(i){let s=i;if(s.code==="MODULE_NOT_FOUND"){if(s.path){let a=s.message.match(/^Cannot find module '([^']+)'$/);if(a){let u=a[1],f=Bo(t,u,e,r);if(f)return f}let l=s.message.match(/^Cannot find module '([^']+)'. Please verify that the package.json has a valid "main" entry$/);if(l){let u=l[1],f=Bo(t,u,e,r);if(f)return f}}let o=Bo(t,n,e,r);if(o)return o}throw s}},"createTsExtensionResolver"),Bg="at cjsPreparseModuleExports (node:internal",MS=U(t=>{let e=t.stack.split(`
|
|
211
|
+
`).slice(1);return e[1].includes(Bg)||e[2].includes(Bg)},"isFromCjsLexer"),jS=U((t,e)=>{let r=t.split("?"),n=new URLSearchParams(r[1]);if(e?.filename){let i=Dg(e.filename),s;if(i){let a=i.split("?"),l=a[0];s=a[1];let u=new URLSearchParams(s).get("namespace");e.filename=l,e.path=G.dirname(l),e.paths=Xe._nodeModulePaths(e.path),u||(Xe._cache[l]=e)}s||(s=e.filename.split("?")[1]);let o=new URLSearchParams(s).get("namespace");o&&n.append("namespace",o)}return[r[0],n,(i,s)=>(G.isAbsolute(i)&&!i.endsWith(".json")&&!i.endsWith(".node")&&!(s===0&&MS(new Error))&&(i+=iu(n)),i)]},"preserveQuery"),US=U((t,e,r,n)=>{if(t.startsWith(ct)&&(t=Ro(t)),n&&!qn(t)&&!e?.filename?.includes($g)){let i=Fo(n,t);for(let s of i)try{return r(s)}catch{}}return r(t)},"resolveTsPaths"),qS=U((t,e,r,n)=>(i,s,...o)=>{if(t.enabled===!1)return e(i,s,...o);i=su(i);let[a,l,u]=jS(i,s);if((l.get("namespace")??void 0)!==n)return e(i,s,...o);Hn(2,"resolve",{request:i,parent:s?.filename??s,restOfArgs:o});let f=U(d=>e(d,s,...o),"nextResolveSimple");f=QS(f,!!(n||s?.filename&&Cr.test(s.filename)),r?.config.compilerOptions?.allowJs??!1),f=FS(f);let c=u(US(a,s,f,r),o.length);return Hn(1,"resolved",{request:i,parent:s?.filename??s,resolved:c}),c},"createResolveFilename"),Lg=U((t,e)=>{if(!e)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return t.startsWith(".")?((typeof e=="string"&&e.startsWith(ct)||e instanceof URL)&&(e=Ro(e)),G.resolve(G.dirname(e),t)):t},"resolveContext"),$i=U(t=>{let{sourceMapsEnabled:e}=process,r={enabled:!0},n=Qo(process.env.TSX_TSCONFIG_PATH);process.setSourceMapsEnabled(!0);let i=Xe._resolveFilename,s=qS(r,i,n,t?.namespace);Xe._resolveFilename=s;let o=TS(r,Xe._extensions,n,t?.namespace),a=t?.namespace?void 0:SS(),l=U(()=>{e===!1&&process.setSourceMapsEnabled(!1),r.enabled=!1,Xe._resolveFilename===s&&(Xe._resolveFilename=i),o(),a?.()},"unregister");if(t?.namespace){let u=U((c,d)=>{let p=Lg(c,d),[m,g]=p.split("?"),A=new URLSearchParams(g);return t.namespace&&!m.startsWith("node:")&&A.set("namespace",t.namespace),jr(m+iu(A))},"scopedRequire");l.require=u;let f=U((c,d,p)=>{let m=Lg(c,d),[g,A]=m.split("?"),y=new URLSearchParams(A);return t.namespace&&!g.startsWith("node:")&&y.set("namespace",t.namespace),s(g+iu(y),module,!1,p)},"scopedResolve");l.resolve=f,l.unregister=l}return l},"register");import{pathToFileURL as Ft,fileURLToPath as s0}from"node:url";import{readFileSync as WS}from"node:fs";import{readFile as KS}from"node:fs/promises";import en from"node:path";var HS=Object.defineProperty,Z=(t,e)=>HS(t,"name",{value:e,configurable:!0}),Ki={active:!0,parsedTsconfig:void 0},o0=Z(t=>{let e={active:!0,namespace:t?.namespace,onImport:t?.onImport,parsedTsconfig:void 0,port:t?.port,tsconfig:t?.tsconfig};return t?.tsconfig!==!1&&(e.parsedTsconfig=Qo(t?.tsconfig??process.env.TSX_TSCONFIG_PATH)),e},"createData"),RN=Z(async t=>{if(!t)throw new Error(`tsx must be loaded with --import instead of --loader
|
|
212
|
+
The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);Object.assign(Ki,o0(t)),t.port&&t.port.on("message",e=>{e==="deactivate"&&(Ki.active=!1,t.port.postMessage({type:"deactivated"}))})},"initialize"),NN=Z(()=>(Ki.parsedTsconfig=Qo(process.env.TSX_TSCONFIG_PATH),"process.setSourceMapsEnabled(true);"),"globalPreload"),GS=Z(t=>{let{pathname:e}=new URL(t),r=en.extname(e);if(r===".mts"||r===".mjs")return"module";if(r===".cts"||r===".cjs")return"commonjs";if(r===".js"||cu.includes(r))return Gg(t)},"getFormatFromFileUrl"),JS=Z(t=>{let{pathname:e}=new URL(t),r=en.extname(e);if(r===".mts"||r===".mjs")return"module";if(r===".cts"||r===".cjs")return"commonjs";if(r===".js"||cu.includes(r))return Jg(t)},"getFormatFromFileUrlSync"),xr="tsx-namespace=",Go="tsx-commonjs-export-preparse",zg=`${Go}=1`,Gi="tsx-commonjs-virtual-query",Wi=new Map,hu=Z((t,e)=>t.slice(1).split("&").filter(r=>r&&e.every(n=>!r.startsWith(n))).join("&"),"getQueryWithoutParameters"),qo=Z((t,e)=>{let r=hu(t,e);return r?`?${r}`:""},"getSearchWithoutParameters"),VS=Z(t=>t.replaceAll(/\/\*[\s\S]*?\*\/|\/\/[^\n\r]*/g,""),"stripComments"),YS=Z(t=>{let e=VS(t);if(/^\s*export\s*\*/.test(e))return"named";if(/^\s*import\s*\*\s*as\s+[\w$]+/.test(e))return"namespace";let r=e.match(/\{([^}]*)\}/)?.[1];if(r)return r.split(",").some(n=>{let i=n.trim().split(/\s+as\s+/)[0];return!!(i&&i!=="default")})?"named":void 0},"getCommonJsImportBinding"),zS=Z((t,e,r)=>{let n=Wi.get(t);if(!n)return!1;try{let[i]=xo(n);return i.some(s=>{if(s.d!==-1||s.n!==e)return!1;let o=YS(n.slice(s.ss,s.s));return o==="named"||r&&o==="namespace"})}catch{return!1}},"parentImportsCommonJsExports"),tn=Z(t=>{let e=t.indexOf(xr);if(e===-1)return;let r=t[e-1];if(r!=="?"&&r!=="&")return;let n=e+xr.length,i=t.indexOf("&",n);return i===-1?t.slice(n):t.slice(n,i)},"getNamespace"),Xg=Et(_p)?"importAttributes":"importAssertions",a0=Z(t=>t==="commonjs"||t==="commonjs-typescript","isCommonJsFormat"),l0=Z(t=>t==="module-typescript"||t==="typescript","isModuleTypeScriptFormat"),XS=Et(In),ZS=[`${Gi}=`],Ho=[`${Go}=`,`${Gi}=`],Zr=Z((t,e)=>e.parsedTsconfig&&To(e.parsedTsconfig,t)?e.parsedTsconfig.config:void 0,"getTsconfigRaw"),ek=Z(t=>{if(!t.searchParams.has(Gi))return;let{pathname:e}=t,r=e.toLowerCase().lastIndexOf("%3f");if(r===-1)return;let n=new URL(t);return n.pathname=e.slice(0,r),n.search="",s0(n)},"getFilePathFromVirtualQuery"),du=Z(t=>{let e=t.startsWith(ct)?new URL(t):void 0,r=e?s0(e):t,n=e&&ek(e),i=n||r,s=e&&n?Ft(i).toString()+qo(e.search,ZS):t;return{fileUrl:e,filePath:i,loadUrl:s}},"getFileLoadContext"),c0=Z((t,e)=>{if(!e?.search)return t;let r=qo(e.search,Ho);return r?Ft(t).toString()+r:t},"getTransformPath"),u0=Z((t,e,r)=>{let n=[...e?hu(e.search,[xr,...Ho]).split("&").filter(Boolean):[],...r?[`namespace=${encodeURIComponent(r)}`]:[]].join("&");return n?`${t}?${n}`:t},"getFilePathWithQuery"),tk=new TextDecoder,f0=Z(t=>typeof t=="string"?t:tk.decode(t),"decodeSource"),rk=Z((t,e)=>{let r=new URL(e),n=e.startsWith(ct)?du(e).filePath:void 0;r.searchParams.delete("tsx-namespace"),r.searchParams.delete(Go),r.searchParams.delete(Gi),n&&(r.pathname=new URL(Ft(n)).pathname);let i=r.toString();return t.port&&t.port.postMessage({type:"load",url:i}),t.onImport?.(i),i},"notifyLoad"),h0=Z((t,e)=>{if(!t.active)return!1;let r=tn(e);if(t.namespace&&t.namespace!==r)return!1;let n=rk(t,e);return yr.send&&yr.send({type:"dependency",path:n}),!0},"prepareLoad"),d0=Z((t,e)=>{if(!qg.test(t))return e;let r=e[Xg];return r?.type?e:{...e,[Xg]:{...r,type:"json"}}},"prepareJsonAttributes"),uu=Z(({conditions:t})=>t?.includes("require")===!0&&!t.includes("import"),"isCommonJsRequireContext$1"),nk=Z(t=>{let e=Z(async(r,n,i)=>{if(!h0(t,r))return i(r,n);let s=tn(r),{fileUrl:o,filePath:a,loadUrl:l}=du(r),u=d0(l,n),f=await i(l,u);ae(3,"loaded by next loader",{url:r,loadUrl:l,loaded:f});let c=o?.searchParams.has(Go)===!0,d=f.format,p=o?new URL(Ft(a)):void 0;if(p&&o&&(p.search=qo(o.search,Ho)),a0(d)&&o&&f.responseURL?.startsWith("file:")&&!a.endsWith(".cjs")){let A=await KS(Ft(a),"utf8"),y=Ti(A);if(d==="commonjs-typescript"||!a.endsWith(".js")||y){if(!XS){if(c&&y&&jo.test(a)){let E=await Hc(A,a,{define:{"import.meta.url":JSON.stringify(p.toString())},tsconfigRaw:Zr(a,t)});return Wi.set(r,E.code),{format:"module",source:St(E)}}return f}if(!s&&!c&&!a.endsWith(".cts"))return f;let _=!!(s||c||qo(o.search,Ho)),b=Jr(A,c0(a,o),{cjsBanner:_?`require = require("node:module").createRequire(${JSON.stringify(Ft(a).toString())});`:void 0,tsconfigRaw:Zr(a,t)});if(f.format="commonjs",f.source=St(b),_){let E=u0(a,o,s);f.responseURL=`data:text/javascript,${encodeURIComponent(b.code)}?filePath=${encodeURIComponent(E)}`}return ae(3,"returning CJS export annotation",f),f}}if(!f.source)return f;let m=f0(f.source),g=d==="json"&&!uu(n);if(d==="commonjs-typescript"){let A=Jr(m,a,{tsconfigRaw:Zr(a,t)});return{...f,format:"commonjs",source:St(A)}}if(g||l0(d)||Cr.test(r)){let A=await Hc(m,a,{tsconfigRaw:Zr(a,t)});return Wi.set(r,A.code),{format:"module",source:St(A)}}if(f.format==="module"){let A=Ar(a,m);A?(f.source=St(A),Wi.set(r,A.code)):Wi.set(r,m)}return f},"load2");return Er?async(r,n,i)=>{ae(2,"load",{url:r,context:n});let s=await e(r,n,i);return ae(1,"loaded",{url:r,result:s}),s}:e},"createLoad"),ik=Z(t=>{let e=Z((r,n,i)=>{if(uu(n)&&Mo()||!h0(t,r))return i(r,n);let s=tn(r),{fileUrl:o,filePath:a,loadUrl:l}=du(r),u=d0(l,n),f=i(l,u);ae(3,"loaded by next loader",{url:r,loadUrl:l,loaded:f});let c=f.format;if(a0(c)&&Et(In)&&f.responseURL?.startsWith("file:")&&!a.endsWith(".cjs")){let m=WS(Ft(a),"utf8");if(c==="commonjs-typescript"||!a.endsWith(".js")||Ti(m)){let g=Jr(m,c0(a,o),{tsconfigRaw:Zr(a,t)}),A=!s&&Mo(),y=u0(a,o,s);return f.format="commonjs",f.shouldBeReloadedByCJSLoader=A,f.source=St(g),A||(f.responseURL=`data:text/javascript,${encodeURIComponent(g.code)}?filePath=${encodeURIComponent(y)}`),ae(3,"returning CJS export annotation",f),f}}if(!f.source)return f;let d=f0(f.source),p=c==="json"&&!uu(n);if(c==="commonjs-typescript"){let m=Jr(d,a,{tsconfigRaw:Zr(a,t)});return{...f,format:"commonjs",shouldBeReloadedByCJSLoader:!1,source:St(m)}}if(p||l0(c)||Cr.test(r)){let m=lg(d,a,{tsconfigRaw:Zr(a,t)});return{format:"module",source:St(m)}}if(f.format==="module"){let m=Ar(a,d);m&&(f.source=St(m))}return f},"load2");return Er?(r,n,i)=>{ae(2,"loadSync",{url:r,context:n});let s=e(r,n,i);return ae(1,"loadedSync",{url:r,result:s}),s}:e},"createLoadSync"),TN=nk(Ki),sk=Et(In),ok=/^(?:[a-z][\d+.a-z-]*:\/\/|data:|file:|node:)/i,p0=Z(t=>!qn(t)&&!ok.test(t),"isTsconfigPathAliasSpecifier"),Jo=Z(t=>{if(t.url)return t.url;let e=t.message.match(/^Cannot find module '([^']+)'/);if(e){let[,n]=e;return n}let r=t.message.match(/^Cannot find package '([^']+)'/);if(r){let[,n]=r;if(!en.isAbsolute(n))return;let i=Ft(n);if(i.pathname.endsWith("/")&&(i.pathname+="package.json"),i.pathname.endsWith("/package.json")){let s=kc(i);if(s?.main)return new URL(s.main,i).toString()}else return i.toString()}},"getMissingPathFromNotFound"),Vo=Z(t=>t==="ERR_MODULE_NOT_FOUND"||t==="MODULE_NOT_FOUND","isModuleNotFound"),$o=Z(async(t,e,r,n)=>{let i=Uo(t);if(ae(3,"resolveExtensions",{url:t,context:e,throwError:n,tryPaths:i}),!i)return;let s;for(let o of i)try{return await r(o,e)}catch(a){let{code:l}=a;if(!Vo(l)&&l!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a;s=a}if(n)throw s},"resolveExtensions"),Wo=Z((t,e,r,n)=>{let i=Uo(t);if(ae(3,"resolveExtensionsSync",{url:t,context:e,throwError:n,tryPaths:i}),!i)return;let s;for(let o of i)try{return r(o,e)}catch(a){let{code:l}=a;if(!Vo(l)&&l!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a;s=a}if(n)throw s},"resolveExtensionsSync"),ak=Z(async(t,e,r,n)=>{let i=n.parsedTsconfig?.config.compilerOptions?.allowJs??!1;if(ae(3,"resolveBase",{specifier:t,context:e,specifierStartsWithFileUrl:t.startsWith(ct),isRelativePath:$n(t),tsExtensionsPattern:Cr.test(e.parentURL),allowJs:i}),(t.startsWith(ct)||$n(t))&&(Cr.test(e.parentURL)||i)){let s=await $o(t,e,r);if(ae(3,"resolveBase resolved",{specifier:t,context:e,resolved:s}),s)return s}try{return await r(t,e)}catch(s){if(ae(3,"resolveBase error",{specifier:t,context:e,error:s}),s instanceof Error){let o=s;if(Vo(o.code)){let a=Jo(o);if(a){let l=await $o(a,e,r);if(l)return l}}}throw s}},"resolveBase"),lk=Z((t,e,r,n)=>{let i=n.parsedTsconfig?.config.compilerOptions?.allowJs??!1;if(ae(3,"resolveBaseSync",{specifier:t,context:e,specifierStartsWithFileUrl:t.startsWith(ct),isRelativePath:$n(t),tsExtensionsPattern:Cr.test(e.parentURL),allowJs:i}),(t.startsWith(ct)||$n(t))&&(Cr.test(e.parentURL)||i)){let s=Wo(t,e,r);if(ae(3,"resolveBaseSync resolved",{specifier:t,context:e,resolved:s}),s)return s}try{return r(t,e)}catch(s){if(ae(3,"resolveBaseSync error",{specifier:t,context:e,error:s}),s instanceof Error){let o=s;if(Vo(o.code)){let a=Jo(o);if(a){let l=Wo(a,e,r);if(l)return l}}}throw s}},"resolveBaseSync"),Zg=Z(async(t,e,r,n)=>{if(ae(3,"resolveDirectory",{specifier:t,context:e,isDirectory:vr.test(t)}),(t==="."||t===".."||t.endsWith("/.."))&&(t+="/"),vr.test(t)){let i=new URL(t,e.parentURL);return i.pathname=en.join(i.pathname,"index"),await $o(i.toString(),e,r,!0)}try{return await ak(t,e,r,n)}catch(i){if(i instanceof Error){ae(3,"resolveDirectory error",{specifier:t,context:e,error:i});let s=i;if(s.code==="ERR_UNSUPPORTED_DIR_IMPORT"){let o=Jo(s);if(o)try{return await $o(`${o}/index`,e,r,!0)}catch(a){let l=a,{message:u}=l;throw l.message=l.message.replace(`${"/index".replace("/",en.sep)}'`,"'"),l.stack=l.stack.replace(u,l.message),l}}}throw i}},"resolveDirectory"),e0=Z((t,e,r,n)=>{if(ae(3,"resolveDirectorySync",{specifier:t,context:e,isDirectory:vr.test(t)}),(t==="."||t===".."||t.endsWith("/.."))&&(t+="/"),vr.test(t)){let i=new URL(t,e.parentURL);return i.pathname=en.join(i.pathname,"index"),Wo(i.toString(),e,r,!0)}try{return lk(t,e,r,n)}catch(i){if(i instanceof Error){ae(3,"resolveDirectorySync error",{specifier:t,context:e,error:i});let s=i;if(s.code==="ERR_UNSUPPORTED_DIR_IMPORT"){let o=Jo(s);if(o)try{return Wo(`${o}/index`,e,r,!0)}catch(a){let l=a,{message:u}=l;throw l.message=l.message.replace(`${"/index".replace("/",en.sep)}'`,"'"),l.stack=l.stack.replace(u,l.message),l}}}throw i}},"resolveDirectorySync"),ck=Z(async(t,e,r,n)=>{let i=p0(t);if(ae(3,"resolveTsPaths",{specifier:t,context:e,tsconfigPathAliasSpecifier:i,tsconfig:n.parsedTsconfig,fromNodeModules:e.parentURL?.includes("/node_modules/")}),i&&n.parsedTsconfig&&!e.parentURL?.includes("/node_modules/")){let s=Fo(n.parsedTsconfig,t);ae(3,"resolveTsPaths",{possiblePaths:s});for(let o of s)try{return await Zg(Ft(o).toString(),e,r,n)}catch{}}return Zg(t,e,r,n)},"resolveTsPaths"),uk=Z((t,e,r,n)=>{let i=p0(t);if(ae(3,"resolveTsPathsSync",{specifier:t,context:e,tsconfigPathAliasSpecifier:i,tsconfig:n.parsedTsconfig,fromNodeModules:e.parentURL?.includes("/node_modules/")}),i&&n.parsedTsconfig&&!e.parentURL?.includes("/node_modules/")){let s=Fo(n.parsedTsconfig,t);ae(3,"resolveTsPathsSync",{possiblePaths:s});for(let o of s)try{return e0(Ft(o).toString(),e,r,n)}catch{}}return e0(t,e,r,n)},"resolveTsPathsSync"),Ko="tsx://",fk=Z(t=>t.conditions.includes("require")&&!t.conditions.includes("import"),"isCommonJsRequireContext"),fu=Z((t,e)=>`${t}${t.includes("?")?"&":"?"}${e}`,"addQuery"),m0=Z((t,e,r)=>{if(e!=="commonjs"||!t.startsWith(ct)||!jo.test(t))return t;let n=new URL(t),i=[hu(n.search,[xr]),...r?[`namespace=${encodeURIComponent(r)}`]:[]].filter(Boolean).join("&");return i?(n.pathname+=`%3F${i}`,n.searchParams.set(Gi,"1"),n.toString()):t},"preserveCommonJsQueryIdentity"),hk=Z(t=>{let e=Z(async(r,n,i)=>{if(!t.active||r.startsWith("node:"))return i(r,n);let s=tn(r)??(n.parentURL&&tn(n.parentURL));if(t.namespace){let f;if(r.startsWith(Ko)){try{f=JSON.parse(r.slice(Ko.length))}catch{}f?.namespace&&(s=f.namespace)}if(t.namespace!==s)return i(r,n);f&&(r=f.specifier,n.parentURL=f.parentURL)}let[o,a]=r.split("?"),l=await ck(o,n,i,t);if(ae(2,"nextResolve",{resolved:l}),l.format==="builtin")return l;(!l.format||l.format==="commonjs-typescript"||l.format==="module-typescript")&&l.url.startsWith(ct)&&(l.format=await GS(l.url),ae(2,"getFormatFromFileUrl",{resolved:l,format:l.format})),a&&(l.url+=`?${a}`);let u=n.parentURL&&l.format==="commonjs"&&jo.test(l.url)&&(n.parentURL.includes(zg)||zS(n.parentURL,r,sk));return s&&!l.url.includes(xr)&&(l.url=fu(l.url,`${xr}${s}`)),u&&(l.url=fu(l.url,zg)),(s||u)&&(l.url=m0(l.url,l.format,s)),l},"resolve2");return Er?async(r,n,i)=>{ae(2,"resolve",{specifier:r,context:n});let s=await e(r,n,i);return ae(1,"resolved",{specifier:r,context:n,result:s}),s}:e},"createResolve"),dk=Z(t=>{let e=Z((r,n,i)=>{if(!t.active||r.startsWith("node:")||fk(n)&&Mo())return i(r,n);let s=tn(r)??(n.parentURL&&tn(n.parentURL));if(t.namespace){let u;if(r.startsWith(Ko)){try{u=JSON.parse(r.slice(Ko.length))}catch{}u?.namespace&&(s=u.namespace)}if(t.namespace!==s)return i(r,n);u&&(r=u.specifier,n.parentURL=u.parentURL)}let[o,a]=r.split("?"),l=uk(o,n,i,t);return ae(2,"nextResolve",{resolved:l}),l.format==="builtin"||((!l.format||l.format==="commonjs-typescript"||l.format==="module-typescript")&&l.url.startsWith(ct)&&(l.format=JS(l.url),ae(2,"getFormatFromFileUrlSync",{resolved:l,format:l.format})),a&&(l.url+=`?${a}`),s&&!l.url.includes(xr)&&(l.url=fu(l.url,`${xr}${s}`)),l.url=m0(l.url,l.format,s)),l},"resolve2");return Er?(r,n,i)=>{ae(2,"resolveSync",{specifier:r,context:n});let s=e(r,n,i);return ae(1,"resolvedSync",{specifier:r,context:n,result:s}),s}:e},"createResolveSync"),FN=hk(Ki),t0=Z(t=>(e,r)=>{if(!r)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");let n=r.startsWith(ct)?r:Ft(r).toString();return import(`tsx://${JSON.stringify({specifier:e,parentURL:n,namespace:t})}`)},"createScopedImport"),r0=!1,pk=Z(t=>{let e=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(n==="--import"){let i=t[r+1];i&&e.push(i),r+=1}else n.startsWith("--import=")&&e.push(n.slice(9))}return e},"collectImportSpecifiers"),mk=Z(()=>[...(process.env.NODE_OPTIONS??"").matchAll(/(?:^|\s)--import(?:=|\s+)(\S+)/g)].map(([,t])=>t),"collectNodeOptionsImportSpecifiers"),n0=[new URL("loader.mjs",import.meta.url).toString(),new URL("esm/index.mjs",import.meta.url).toString()],gk=new Set(["tsx","tsx/esm",...n0,...n0.map(t=>decodeURI(new URL(t).pathname))]),Ak=Z(t=>gk.has(t),"isTsxImport"),g0=Z(t=>/\.(?:[cm]?ts|tsx)(?:[?#].*)?$/.test(t),"isTypeScriptImport"),yk=Z(()=>{let t=pk(process.execArgv),e=t.findIndex(Ak);return e>0&&t.slice(0,e).some(g0)},"hasCliTypeScriptPreload"),wk=mk().some(g0)||yk(),i0=typeof Wn.registerHooks=="function"&&Et(bp)&&!wk,A0=Z(t=>{if(!Wn.register&&!i0)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.19 or v20.6 and above.`);if(!r0){let{_resolveFilename:a}=Wn;Wn._resolveFilename=(l,...u)=>a(su(l),...u),r0=!0}let{sourceMapsEnabled:e}=process;if(process.setSourceMapsEnabled(!0),i0){let a=o0({namespace:t?.namespace,onImport:t?.onImport,tsconfig:t?.tsconfig}),l=Wn.registerHooks({load:ik(a),resolve:dk(a)}),u=Z(async()=>{a.active=!1,l.deregister(),e===!1&&process.setSourceMapsEnabled(!1)},"unregister2");return t?.namespace&&(u.import=t0(t.namespace),u.unregister=u),u}let{port1:r,port2:n}=new $S;Wn.register(`./esm/index.mjs?${Date.now()}`,{parentURL:import.meta.url,data:{port:n,namespace:t?.namespace,tsconfig:t?.tsconfig},transferList:[n]});let i=t?.onImport,s=i&&(a=>{a.type==="load"&&i(a.url)});s&&(r.on("message",s),r.unref());let o=Z(()=>(e===!1&&process.setSourceMapsEnabled(!1),s&&r.off("message",s),r.postMessage("deactivate"),new Promise(a=>{let l=Z(u=>{u.type==="deactivated"&&(a(),r.off("message",l))},"onDeactivated");r.on("message",l)})),"unregister");return t?.namespace&&(o.import=t0(t.namespace),o.unregister=o),o},"register");var bk=Object.defineProperty,w0=(t,e)=>bk(t,"name",{value:e,configurable:!0}),Kn,Yo=w0((t,e)=>(Kn||(Kn=$i({namespace:Date.now().toString()})),Kn.require(t,e)),"tsxRequire"),y0=w0((t,e,r)=>(Kn||(Kn=$i({namespace:Date.now().toString()})),Kn.resolve(t,e,r)),"resolve");y0.paths=jr.resolve.paths,Yo.resolve=y0,Yo.main=jr.main,Yo.extensions=jr.extensions,Yo.cache=jr.cache;var JN=vn(sc(),1);var _k=Object.defineProperty,vk=(t,e)=>_k(t,"name",{value:e,configurable:!0}),pu=vk((t,e)=>{if(!e||typeof e=="object"&&!e.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");let r=typeof e=="string",n=r?e:e.parentURL,i=Date.now().toString(),s=$i({namespace:i});return!Et(In)&&!Hg.test(t)&&Ug.test(t)?Promise.resolve(s.require(t,n)):A0({namespace:i,...r?{}:e}).import(t,n)},"tsImport");var D0=vn(L0(),1),{program:oT,createCommand:aT,createArgument:lT,createOption:cT,CommanderError:uT,InvalidArgumentError:fT,InvalidOptionArgumentError:hT,Command:P0,Argument:dT,Option:pT,Help:mT}=D0.default;var R0=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
|
|
213
|
+
cli_contracts: 0.1.0
|
|
214
|
+
|
|
215
|
+
info:
|
|
216
|
+
title: embedoc CLI
|
|
217
|
+
version: 0.12.0
|
|
218
|
+
description: >-
|
|
219
|
+
In-place document generator that auto-updates marker blocks in documents
|
|
220
|
+
and source code while preserving manually edited sections. Supports
|
|
221
|
+
multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable
|
|
222
|
+
TypeScript renderers, Handlebars file generation, and incremental builds
|
|
223
|
+
with dependency tracking.
|
|
224
|
+
license:
|
|
225
|
+
name: MIT
|
|
226
|
+
contact:
|
|
227
|
+
name: foo-ogawa
|
|
228
|
+
url: https://github.com/foo-ogawa/embedoc
|
|
229
|
+
|
|
230
|
+
artifact_slots:
|
|
231
|
+
config:
|
|
232
|
+
direction: read
|
|
233
|
+
description: embedoc.config.yaml configuration
|
|
234
|
+
documents:
|
|
235
|
+
direction: readwrite
|
|
236
|
+
description: Target documents with @embedoc marker blocks
|
|
237
|
+
templates:
|
|
238
|
+
direction: read
|
|
239
|
+
description: Handlebars templates for file generation
|
|
240
|
+
datasources:
|
|
241
|
+
direction: read
|
|
242
|
+
description: Datasource files (SQLite, CSV, JSON, YAML)
|
|
243
|
+
generated-files:
|
|
244
|
+
direction: write
|
|
245
|
+
description: Files generated by Handlebars templates
|
|
246
|
+
|
|
247
|
+
command_sets:
|
|
248
|
+
embedoc:
|
|
249
|
+
summary: In-place document generator with marker-based embedding.
|
|
250
|
+
executable: embedoc
|
|
251
|
+
|
|
252
|
+
global_options:
|
|
253
|
+
- name: version
|
|
254
|
+
aliases: [V]
|
|
255
|
+
description: Print version and exit.
|
|
256
|
+
schema:
|
|
257
|
+
type: boolean
|
|
258
|
+
|
|
259
|
+
- name: help
|
|
260
|
+
aliases: [h]
|
|
261
|
+
description: Show help and exit.
|
|
262
|
+
schema:
|
|
263
|
+
type: boolean
|
|
264
|
+
|
|
265
|
+
commands:
|
|
266
|
+
# \u2500\u2500 init \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
267
|
+
init:
|
|
268
|
+
summary: Initialize embedoc in the current project.
|
|
269
|
+
description: >-
|
|
270
|
+
Creates starter configuration and directory structure:
|
|
271
|
+
embedoc.config.yaml, .embedoc/renderers/index.ts,
|
|
272
|
+
.embedoc/datasources/index.ts, and .embedoc/templates/.
|
|
273
|
+
If package.json exists, adds embedoc:build, embedoc:watch,
|
|
274
|
+
and embedoc:generate npm scripts.
|
|
275
|
+
usage:
|
|
276
|
+
- embedoc init
|
|
277
|
+
- embedoc init --force
|
|
278
|
+
|
|
279
|
+
options:
|
|
280
|
+
- name: force
|
|
281
|
+
aliases: [f]
|
|
282
|
+
description: Overwrite existing files.
|
|
283
|
+
schema:
|
|
284
|
+
type: boolean
|
|
285
|
+
default: false
|
|
286
|
+
|
|
287
|
+
exits:
|
|
288
|
+
'0':
|
|
289
|
+
description: Initialization succeeded.
|
|
290
|
+
stdout:
|
|
291
|
+
format: text
|
|
292
|
+
files:
|
|
293
|
+
- path: embedoc.config.yaml
|
|
294
|
+
required: false
|
|
295
|
+
media_type: application/yaml
|
|
296
|
+
encoding: utf-8
|
|
297
|
+
description: Configuration file.
|
|
298
|
+
- path: .embedoc/renderers/index.ts
|
|
299
|
+
required: false
|
|
300
|
+
media_type: text/x-typescript
|
|
301
|
+
encoding: utf-8
|
|
302
|
+
description: Renderer registration file.
|
|
303
|
+
- path: .embedoc/datasources/index.ts
|
|
304
|
+
required: false
|
|
305
|
+
media_type: text/x-typescript
|
|
306
|
+
encoding: utf-8
|
|
307
|
+
description: Custom datasource registration file.
|
|
308
|
+
- path: .embedoc/templates/.gitkeep
|
|
309
|
+
required: false
|
|
310
|
+
description: Templates directory placeholder.
|
|
311
|
+
|
|
312
|
+
'1':
|
|
313
|
+
description: Initialization failed (write error).
|
|
314
|
+
stderr:
|
|
315
|
+
format: text
|
|
316
|
+
|
|
317
|
+
x-agent:
|
|
318
|
+
risk_level: low
|
|
319
|
+
requires_confirmation: false
|
|
320
|
+
idempotent: true
|
|
321
|
+
side_effects:
|
|
322
|
+
- file_write
|
|
323
|
+
- directory_create
|
|
324
|
+
|
|
325
|
+
# \u2500\u2500 build \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
326
|
+
build:
|
|
327
|
+
summary: Build documents by replacing markers with rendered content.
|
|
328
|
+
description: >-
|
|
329
|
+
Loads configuration, initializes datasources, loads TypeScript
|
|
330
|
+
renderers, and processes all target files (or specific files if
|
|
331
|
+
provided). Each @embedoc marker block is re-rendered and the
|
|
332
|
+
content between start/end markers is replaced in-place.
|
|
333
|
+
usage:
|
|
334
|
+
- embedoc build
|
|
335
|
+
- embedoc build --config embedoc.config.yaml
|
|
336
|
+
- embedoc build ./docs/tables/users.md
|
|
337
|
+
- embedoc build --dry-run --verbose
|
|
338
|
+
|
|
339
|
+
arguments:
|
|
340
|
+
- name: files
|
|
341
|
+
description: Specific file paths to process. If omitted, processes all targets from config.
|
|
342
|
+
schema:
|
|
343
|
+
type: array
|
|
344
|
+
items:
|
|
345
|
+
type: string
|
|
346
|
+
variadic: true
|
|
347
|
+
file:
|
|
348
|
+
mode: readWrite
|
|
349
|
+
exists: true
|
|
350
|
+
|
|
351
|
+
options:
|
|
352
|
+
- name: config
|
|
353
|
+
aliases: [c]
|
|
354
|
+
description: Path to config file (YAML or JSON).
|
|
355
|
+
value_name: path
|
|
356
|
+
schema:
|
|
357
|
+
type: string
|
|
358
|
+
default: embedoc.config.yaml
|
|
359
|
+
file:
|
|
360
|
+
mode: read
|
|
361
|
+
exists: true
|
|
362
|
+
media_type: application/yaml
|
|
363
|
+
encoding: utf-8
|
|
364
|
+
|
|
365
|
+
- name: dry-run
|
|
366
|
+
aliases: [d]
|
|
367
|
+
description: Preview changes without writing files.
|
|
368
|
+
schema:
|
|
369
|
+
type: boolean
|
|
370
|
+
default: false
|
|
371
|
+
|
|
372
|
+
- name: verbose
|
|
373
|
+
aliases: [v]
|
|
374
|
+
description: Enable verbose output.
|
|
375
|
+
schema:
|
|
376
|
+
type: boolean
|
|
377
|
+
default: false
|
|
378
|
+
|
|
379
|
+
exits:
|
|
380
|
+
'0':
|
|
381
|
+
description: Build succeeded. All markers were processed without errors.
|
|
382
|
+
stdout:
|
|
383
|
+
format: text
|
|
384
|
+
|
|
385
|
+
'1':
|
|
386
|
+
description: Build failed (config not found, datasource error, or marker processing error).
|
|
387
|
+
stderr:
|
|
388
|
+
format: text
|
|
389
|
+
|
|
390
|
+
x-agent:
|
|
391
|
+
risk_level: medium
|
|
392
|
+
requires_confirmation: false
|
|
393
|
+
idempotent: true
|
|
394
|
+
side_effects:
|
|
395
|
+
- file_write
|
|
396
|
+
safe_dry_run_option: --dry-run
|
|
397
|
+
recommended_before_use:
|
|
398
|
+
- Ensure embedoc.config.yaml exists (run init if needed).
|
|
399
|
+
- Verify datasource files are accessible.
|
|
400
|
+
|
|
401
|
+
# \u2500\u2500 generate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
402
|
+
generate:
|
|
403
|
+
summary: Generate new files from datasource records using Handlebars templates.
|
|
404
|
+
description: >-
|
|
405
|
+
Reads datasource records and generates new files using Handlebars
|
|
406
|
+
templates defined in the generators config. Requires either
|
|
407
|
+
--datasource to process a specific datasource or --all to process
|
|
408
|
+
all datasources that have generators configured. Optionally filter
|
|
409
|
+
by generator template name with --generator.
|
|
410
|
+
usage:
|
|
411
|
+
- embedoc generate --datasource tables
|
|
412
|
+
- embedoc generate --all
|
|
413
|
+
- embedoc generate --datasource tables --generator table_doc.hbs
|
|
414
|
+
- embedoc generate --all --dry-run --verbose
|
|
415
|
+
|
|
416
|
+
options:
|
|
417
|
+
- name: config
|
|
418
|
+
aliases: [c]
|
|
419
|
+
description: Path to config file (YAML or JSON).
|
|
420
|
+
value_name: path
|
|
421
|
+
schema:
|
|
422
|
+
type: string
|
|
423
|
+
default: embedoc.config.yaml
|
|
424
|
+
file:
|
|
425
|
+
mode: read
|
|
426
|
+
exists: true
|
|
427
|
+
media_type: application/yaml
|
|
428
|
+
encoding: utf-8
|
|
429
|
+
|
|
430
|
+
- name: datasource
|
|
431
|
+
aliases: [s]
|
|
432
|
+
description: Specific datasource to process.
|
|
433
|
+
value_name: name
|
|
434
|
+
schema:
|
|
435
|
+
type: string
|
|
436
|
+
|
|
437
|
+
- name: generator
|
|
438
|
+
aliases: [g]
|
|
439
|
+
description: Specific generator template to use.
|
|
440
|
+
value_name: name
|
|
441
|
+
schema:
|
|
442
|
+
type: string
|
|
443
|
+
|
|
444
|
+
- name: all
|
|
445
|
+
aliases: [a]
|
|
446
|
+
description: Process all datasources that have generators configured.
|
|
447
|
+
schema:
|
|
448
|
+
type: boolean
|
|
449
|
+
default: false
|
|
450
|
+
|
|
451
|
+
- name: dry-run
|
|
452
|
+
aliases: [d]
|
|
453
|
+
description: Preview generation without writing files.
|
|
454
|
+
schema:
|
|
455
|
+
type: boolean
|
|
456
|
+
default: false
|
|
457
|
+
|
|
458
|
+
- name: verbose
|
|
459
|
+
aliases: [v]
|
|
460
|
+
description: Enable verbose output.
|
|
461
|
+
schema:
|
|
462
|
+
type: boolean
|
|
463
|
+
default: false
|
|
464
|
+
|
|
465
|
+
exits:
|
|
466
|
+
'0':
|
|
467
|
+
description: Generation succeeded.
|
|
468
|
+
stdout:
|
|
469
|
+
format: text
|
|
470
|
+
|
|
471
|
+
'1':
|
|
472
|
+
description: >-
|
|
473
|
+
Generation failed (missing --datasource/--all, config not found,
|
|
474
|
+
datasource error, or template error).
|
|
475
|
+
stderr:
|
|
476
|
+
format: text
|
|
477
|
+
|
|
478
|
+
x-agent:
|
|
479
|
+
risk_level: medium
|
|
480
|
+
requires_confirmation: false
|
|
481
|
+
idempotent: true
|
|
482
|
+
side_effects:
|
|
483
|
+
- file_write
|
|
484
|
+
safe_dry_run_option: --dry-run
|
|
485
|
+
recommended_before_use:
|
|
486
|
+
- Ensure embedoc.config.yaml exists with generators configured.
|
|
487
|
+
- Verify datasource files are accessible.
|
|
488
|
+
- Ensure Handlebars templates exist in templates_dir.
|
|
489
|
+
|
|
490
|
+
# \u2500\u2500 watch \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
491
|
+
watch:
|
|
492
|
+
summary: Watch files and rebuild on changes with dependency tracking.
|
|
493
|
+
description: >-
|
|
494
|
+
Monitors target files, renderers, and datasource files for changes.
|
|
495
|
+
When a change is detected, rebuilds only affected documents using
|
|
496
|
+
the dependency graph. Renderer changes trigger a full renderer
|
|
497
|
+
reload and dependency graph rebuild. Runs until interrupted with
|
|
498
|
+
SIGINT (Ctrl+C).
|
|
499
|
+
usage:
|
|
500
|
+
- embedoc watch
|
|
501
|
+
- embedoc watch --config embedoc.config.yaml
|
|
502
|
+
- embedoc watch --verbose
|
|
503
|
+
- embedoc watch --debug-deps
|
|
504
|
+
|
|
505
|
+
options:
|
|
506
|
+
- name: config
|
|
507
|
+
aliases: [c]
|
|
508
|
+
description: Path to config file (YAML or JSON).
|
|
509
|
+
value_name: path
|
|
510
|
+
schema:
|
|
511
|
+
type: string
|
|
512
|
+
default: embedoc.config.yaml
|
|
513
|
+
file:
|
|
514
|
+
mode: read
|
|
515
|
+
exists: true
|
|
516
|
+
media_type: application/yaml
|
|
517
|
+
encoding: utf-8
|
|
518
|
+
|
|
519
|
+
- name: verbose
|
|
520
|
+
aliases: [v]
|
|
521
|
+
description: Enable verbose rebuild output.
|
|
522
|
+
schema:
|
|
523
|
+
type: boolean
|
|
524
|
+
default: false
|
|
525
|
+
|
|
526
|
+
- name: debug-deps
|
|
527
|
+
description: Print dependency graph at startup for debugging.
|
|
528
|
+
schema:
|
|
529
|
+
type: boolean
|
|
530
|
+
default: false
|
|
531
|
+
|
|
532
|
+
signals:
|
|
533
|
+
SIGINT:
|
|
534
|
+
description: Gracefully stops the watcher, closes datasources, and exits.
|
|
535
|
+
|
|
536
|
+
exits:
|
|
537
|
+
'0':
|
|
538
|
+
description: Watcher stopped gracefully (via SIGINT).
|
|
539
|
+
stdout:
|
|
540
|
+
format: text
|
|
541
|
+
|
|
542
|
+
'1':
|
|
543
|
+
description: Watch failed (config not found or initialization error).
|
|
544
|
+
stderr:
|
|
545
|
+
format: text
|
|
546
|
+
|
|
547
|
+
x-agent:
|
|
548
|
+
risk_level: medium
|
|
549
|
+
requires_confirmation: false
|
|
550
|
+
idempotent: true
|
|
551
|
+
side_effects:
|
|
552
|
+
- file_write
|
|
553
|
+
recommended_before_use:
|
|
554
|
+
- Ensure embedoc.config.yaml exists (run init if needed).
|
|
555
|
+
- Verify datasource files are accessible.
|
|
556
|
+
`,N0=`{
|
|
557
|
+
"cli_contracts": "0.1.0",
|
|
558
|
+
"info": {
|
|
559
|
+
"title": "embedoc CLI",
|
|
560
|
+
"version": "0.12.0",
|
|
561
|
+
"description": "In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.",
|
|
562
|
+
"license": {
|
|
563
|
+
"name": "MIT"
|
|
564
|
+
},
|
|
565
|
+
"contact": {
|
|
566
|
+
"name": "foo-ogawa",
|
|
567
|
+
"url": "https://github.com/foo-ogawa/embedoc"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"artifact_slots": {
|
|
571
|
+
"config": {
|
|
572
|
+
"direction": "read",
|
|
573
|
+
"description": "embedoc.config.yaml configuration"
|
|
574
|
+
},
|
|
575
|
+
"documents": {
|
|
576
|
+
"direction": "readwrite",
|
|
577
|
+
"description": "Target documents with @embedoc marker blocks"
|
|
578
|
+
},
|
|
579
|
+
"templates": {
|
|
580
|
+
"direction": "read",
|
|
581
|
+
"description": "Handlebars templates for file generation"
|
|
582
|
+
},
|
|
583
|
+
"datasources": {
|
|
584
|
+
"direction": "read",
|
|
585
|
+
"description": "Datasource files (SQLite, CSV, JSON, YAML)"
|
|
586
|
+
},
|
|
587
|
+
"generated-files": {
|
|
588
|
+
"direction": "write",
|
|
589
|
+
"description": "Files generated by Handlebars templates"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"command_sets": {
|
|
593
|
+
"embedoc": {
|
|
594
|
+
"summary": "In-place document generator with marker-based embedding.",
|
|
595
|
+
"executable": "embedoc",
|
|
596
|
+
"global_options": [
|
|
597
|
+
{
|
|
598
|
+
"name": "version",
|
|
599
|
+
"aliases": [
|
|
600
|
+
"V"
|
|
601
|
+
],
|
|
602
|
+
"description": "Print version and exit.",
|
|
603
|
+
"schema": {
|
|
604
|
+
"type": "boolean"
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "help",
|
|
609
|
+
"aliases": [
|
|
610
|
+
"h"
|
|
611
|
+
],
|
|
612
|
+
"description": "Show help and exit.",
|
|
613
|
+
"schema": {
|
|
614
|
+
"type": "boolean"
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"commands": {
|
|
619
|
+
"init": {
|
|
620
|
+
"summary": "Initialize embedoc in the current project.",
|
|
621
|
+
"description": "Creates starter configuration and directory structure: embedoc.config.yaml, .embedoc/renderers/index.ts, .embedoc/datasources/index.ts, and .embedoc/templates/. If package.json exists, adds embedoc:build, embedoc:watch, and embedoc:generate npm scripts.",
|
|
622
|
+
"usage": [
|
|
623
|
+
"embedoc init",
|
|
624
|
+
"embedoc init --force"
|
|
625
|
+
],
|
|
626
|
+
"options": [
|
|
627
|
+
{
|
|
628
|
+
"name": "force",
|
|
629
|
+
"aliases": [
|
|
630
|
+
"f"
|
|
631
|
+
],
|
|
632
|
+
"description": "Overwrite existing files.",
|
|
633
|
+
"schema": {
|
|
634
|
+
"type": "boolean",
|
|
635
|
+
"default": false
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
"exits": {
|
|
640
|
+
"0": {
|
|
641
|
+
"description": "Initialization succeeded.",
|
|
642
|
+
"stdout": {
|
|
643
|
+
"format": "text"
|
|
644
|
+
},
|
|
645
|
+
"files": [
|
|
646
|
+
{
|
|
647
|
+
"path": "embedoc.config.yaml",
|
|
648
|
+
"required": false,
|
|
649
|
+
"media_type": "application/yaml",
|
|
650
|
+
"encoding": "utf-8",
|
|
651
|
+
"description": "Configuration file."
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"path": ".embedoc/renderers/index.ts",
|
|
655
|
+
"required": false,
|
|
656
|
+
"media_type": "text/x-typescript",
|
|
657
|
+
"encoding": "utf-8",
|
|
658
|
+
"description": "Renderer registration file."
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"path": ".embedoc/datasources/index.ts",
|
|
662
|
+
"required": false,
|
|
663
|
+
"media_type": "text/x-typescript",
|
|
664
|
+
"encoding": "utf-8",
|
|
665
|
+
"description": "Custom datasource registration file."
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"path": ".embedoc/templates/.gitkeep",
|
|
669
|
+
"required": false,
|
|
670
|
+
"description": "Templates directory placeholder."
|
|
671
|
+
}
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
"1": {
|
|
675
|
+
"description": "Initialization failed (write error).",
|
|
676
|
+
"stderr": {
|
|
677
|
+
"format": "text"
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"x-agent": {
|
|
682
|
+
"risk_level": "low",
|
|
683
|
+
"requires_confirmation": false,
|
|
684
|
+
"idempotent": true,
|
|
685
|
+
"side_effects": [
|
|
686
|
+
"file_write",
|
|
687
|
+
"directory_create"
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"build": {
|
|
692
|
+
"summary": "Build documents by replacing markers with rendered content.",
|
|
693
|
+
"description": "Loads configuration, initializes datasources, loads TypeScript renderers, and processes all target files (or specific files if provided). Each @embedoc marker block is re-rendered and the content between start/end markers is replaced in-place.",
|
|
694
|
+
"usage": [
|
|
695
|
+
"embedoc build",
|
|
696
|
+
"embedoc build --config embedoc.config.yaml",
|
|
697
|
+
"embedoc build ./docs/tables/users.md",
|
|
698
|
+
"embedoc build --dry-run --verbose"
|
|
699
|
+
],
|
|
700
|
+
"arguments": [
|
|
701
|
+
{
|
|
702
|
+
"name": "files",
|
|
703
|
+
"description": "Specific file paths to process. If omitted, processes all targets from config.",
|
|
704
|
+
"schema": {
|
|
705
|
+
"type": "array",
|
|
706
|
+
"items": {
|
|
707
|
+
"type": "string"
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"variadic": true,
|
|
711
|
+
"file": {
|
|
712
|
+
"mode": "readWrite",
|
|
713
|
+
"exists": true
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
"options": [
|
|
718
|
+
{
|
|
719
|
+
"name": "config",
|
|
720
|
+
"aliases": [
|
|
721
|
+
"c"
|
|
722
|
+
],
|
|
723
|
+
"description": "Path to config file (YAML or JSON).",
|
|
724
|
+
"value_name": "path",
|
|
725
|
+
"schema": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"default": "embedoc.config.yaml"
|
|
728
|
+
},
|
|
729
|
+
"file": {
|
|
730
|
+
"mode": "read",
|
|
731
|
+
"exists": true,
|
|
732
|
+
"media_type": "application/yaml",
|
|
733
|
+
"encoding": "utf-8"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "dry-run",
|
|
738
|
+
"aliases": [
|
|
739
|
+
"d"
|
|
740
|
+
],
|
|
741
|
+
"description": "Preview changes without writing files.",
|
|
742
|
+
"schema": {
|
|
743
|
+
"type": "boolean",
|
|
744
|
+
"default": false
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"name": "verbose",
|
|
749
|
+
"aliases": [
|
|
750
|
+
"v"
|
|
751
|
+
],
|
|
752
|
+
"description": "Enable verbose output.",
|
|
753
|
+
"schema": {
|
|
754
|
+
"type": "boolean",
|
|
755
|
+
"default": false
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
],
|
|
759
|
+
"exits": {
|
|
760
|
+
"0": {
|
|
761
|
+
"description": "Build succeeded. All markers were processed without errors.",
|
|
762
|
+
"stdout": {
|
|
763
|
+
"format": "text"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"1": {
|
|
767
|
+
"description": "Build failed (config not found, datasource error, or marker processing error).",
|
|
768
|
+
"stderr": {
|
|
769
|
+
"format": "text"
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"x-agent": {
|
|
774
|
+
"risk_level": "medium",
|
|
775
|
+
"requires_confirmation": false,
|
|
776
|
+
"idempotent": true,
|
|
777
|
+
"side_effects": [
|
|
778
|
+
"file_write"
|
|
779
|
+
],
|
|
780
|
+
"safe_dry_run_option": "--dry-run",
|
|
781
|
+
"recommended_before_use": [
|
|
782
|
+
"Ensure embedoc.config.yaml exists (run init if needed).",
|
|
783
|
+
"Verify datasource files are accessible."
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
"generate": {
|
|
788
|
+
"summary": "Generate new files from datasource records using Handlebars templates.",
|
|
789
|
+
"description": "Reads datasource records and generates new files using Handlebars templates defined in the generators config. Requires either --datasource to process a specific datasource or --all to process all datasources that have generators configured. Optionally filter by generator template name with --generator.",
|
|
790
|
+
"usage": [
|
|
791
|
+
"embedoc generate --datasource tables",
|
|
792
|
+
"embedoc generate --all",
|
|
793
|
+
"embedoc generate --datasource tables --generator table_doc.hbs",
|
|
794
|
+
"embedoc generate --all --dry-run --verbose"
|
|
795
|
+
],
|
|
796
|
+
"options": [
|
|
797
|
+
{
|
|
798
|
+
"name": "config",
|
|
799
|
+
"aliases": [
|
|
800
|
+
"c"
|
|
801
|
+
],
|
|
802
|
+
"description": "Path to config file (YAML or JSON).",
|
|
803
|
+
"value_name": "path",
|
|
804
|
+
"schema": {
|
|
805
|
+
"type": "string",
|
|
806
|
+
"default": "embedoc.config.yaml"
|
|
807
|
+
},
|
|
808
|
+
"file": {
|
|
809
|
+
"mode": "read",
|
|
810
|
+
"exists": true,
|
|
811
|
+
"media_type": "application/yaml",
|
|
812
|
+
"encoding": "utf-8"
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "datasource",
|
|
817
|
+
"aliases": [
|
|
818
|
+
"s"
|
|
819
|
+
],
|
|
820
|
+
"description": "Specific datasource to process.",
|
|
821
|
+
"value_name": "name",
|
|
822
|
+
"schema": {
|
|
823
|
+
"type": "string"
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"name": "generator",
|
|
828
|
+
"aliases": [
|
|
829
|
+
"g"
|
|
830
|
+
],
|
|
831
|
+
"description": "Specific generator template to use.",
|
|
832
|
+
"value_name": "name",
|
|
833
|
+
"schema": {
|
|
834
|
+
"type": "string"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "all",
|
|
839
|
+
"aliases": [
|
|
840
|
+
"a"
|
|
841
|
+
],
|
|
842
|
+
"description": "Process all datasources that have generators configured.",
|
|
843
|
+
"schema": {
|
|
844
|
+
"type": "boolean",
|
|
845
|
+
"default": false
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"name": "dry-run",
|
|
850
|
+
"aliases": [
|
|
851
|
+
"d"
|
|
852
|
+
],
|
|
853
|
+
"description": "Preview generation without writing files.",
|
|
854
|
+
"schema": {
|
|
855
|
+
"type": "boolean",
|
|
856
|
+
"default": false
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "verbose",
|
|
861
|
+
"aliases": [
|
|
862
|
+
"v"
|
|
863
|
+
],
|
|
864
|
+
"description": "Enable verbose output.",
|
|
865
|
+
"schema": {
|
|
866
|
+
"type": "boolean",
|
|
867
|
+
"default": false
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
],
|
|
871
|
+
"exits": {
|
|
872
|
+
"0": {
|
|
873
|
+
"description": "Generation succeeded.",
|
|
874
|
+
"stdout": {
|
|
875
|
+
"format": "text"
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
"1": {
|
|
879
|
+
"description": "Generation failed (missing --datasource/--all, config not found, datasource error, or template error).",
|
|
880
|
+
"stderr": {
|
|
881
|
+
"format": "text"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
"x-agent": {
|
|
886
|
+
"risk_level": "medium",
|
|
887
|
+
"requires_confirmation": false,
|
|
888
|
+
"idempotent": true,
|
|
889
|
+
"side_effects": [
|
|
890
|
+
"file_write"
|
|
891
|
+
],
|
|
892
|
+
"safe_dry_run_option": "--dry-run",
|
|
893
|
+
"recommended_before_use": [
|
|
894
|
+
"Ensure embedoc.config.yaml exists with generators configured.",
|
|
895
|
+
"Verify datasource files are accessible.",
|
|
896
|
+
"Ensure Handlebars templates exist in templates_dir."
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"watch": {
|
|
901
|
+
"summary": "Watch files and rebuild on changes with dependency tracking.",
|
|
902
|
+
"description": "Monitors target files, renderers, and datasource files for changes. When a change is detected, rebuilds only affected documents using the dependency graph. Renderer changes trigger a full renderer reload and dependency graph rebuild. Runs until interrupted with SIGINT (Ctrl+C).",
|
|
903
|
+
"usage": [
|
|
904
|
+
"embedoc watch",
|
|
905
|
+
"embedoc watch --config embedoc.config.yaml",
|
|
906
|
+
"embedoc watch --verbose",
|
|
907
|
+
"embedoc watch --debug-deps"
|
|
908
|
+
],
|
|
909
|
+
"options": [
|
|
910
|
+
{
|
|
911
|
+
"name": "config",
|
|
912
|
+
"aliases": [
|
|
913
|
+
"c"
|
|
914
|
+
],
|
|
915
|
+
"description": "Path to config file (YAML or JSON).",
|
|
916
|
+
"value_name": "path",
|
|
917
|
+
"schema": {
|
|
918
|
+
"type": "string",
|
|
919
|
+
"default": "embedoc.config.yaml"
|
|
920
|
+
},
|
|
921
|
+
"file": {
|
|
922
|
+
"mode": "read",
|
|
923
|
+
"exists": true,
|
|
924
|
+
"media_type": "application/yaml",
|
|
925
|
+
"encoding": "utf-8"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "verbose",
|
|
930
|
+
"aliases": [
|
|
931
|
+
"v"
|
|
932
|
+
],
|
|
933
|
+
"description": "Enable verbose rebuild output.",
|
|
934
|
+
"schema": {
|
|
935
|
+
"type": "boolean",
|
|
936
|
+
"default": false
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "debug-deps",
|
|
941
|
+
"description": "Print dependency graph at startup for debugging.",
|
|
942
|
+
"schema": {
|
|
943
|
+
"type": "boolean",
|
|
944
|
+
"default": false
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"signals": {
|
|
949
|
+
"SIGINT": {
|
|
950
|
+
"description": "Gracefully stops the watcher, closes datasources, and exits."
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
"exits": {
|
|
954
|
+
"0": {
|
|
955
|
+
"description": "Watcher stopped gracefully (via SIGINT).",
|
|
956
|
+
"stdout": {
|
|
957
|
+
"format": "text"
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
"1": {
|
|
961
|
+
"description": "Watch failed (config not found or initialization error).",
|
|
962
|
+
"stderr": {
|
|
963
|
+
"format": "text"
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"x-agent": {
|
|
968
|
+
"risk_level": "medium",
|
|
969
|
+
"requires_confirmation": false,
|
|
970
|
+
"idempotent": true,
|
|
971
|
+
"side_effects": [
|
|
972
|
+
"file_write"
|
|
973
|
+
],
|
|
974
|
+
"recommended_before_use": [
|
|
975
|
+
"Ensure embedoc.config.yaml exists (run init if needed).",
|
|
976
|
+
"Verify datasource files are accessible."
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}`;function T0(t,e){let r=new P0;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("-F, --format <format>","Output format (yaml or json).","yaml").action(async(n,i,s)=>{n.length===0&&!i.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
|
|
984
|
+
`),process.exit(2));let o=i.format||"yaml",a=JSON.parse(N0),l=i.all?[]:n;if(l.length===0)if(o==="json"){let u={};i.includeMeta&&(u._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:a.cli_contracts??"0.1.0",commands:["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"]}),Object.assign(u,a),process.stdout.write(JSON.stringify(u,null,2)+`
|
|
985
|
+
`)}else{let u=[];if(u.push("# embedoc extract"),u.push("# source: embedded"),u.push("# type: cli-contracts/command-extract"),i.includeMeta){u.push("---"),u.push("source: embedded"),u.push("type: cli-contracts/command-extract"),u.push("extractedAt: "+new Date().toISOString()),u.push("spec_version: "+(a.cli_contracts??"0.1.0")),u.push("commands:");for(let f of["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"])u.push(" - "+f)}u.push("---"),u.push(R0),process.stdout.write(u.join(`
|
|
986
|
+
`)+`
|
|
987
|
+
`)}else{let u={cli_contracts:a.cli_contracts,info:a.info,command_sets:{}},f=u.command_sets;for(let[c,d]of Object.entries(a.command_sets??{})){let p=d.commands;if(!p)continue;let m={};for(let[g,A]of Object.entries(p)){let y=c+"."+g;l.some(_=>_===g||_===y||g.startsWith(_+"."))&&(m[g]=A)}if(Object.keys(m).length>0){let g={...d};g.commands=m,f[c]=g}}a.components&&(u.components=a.components),process.stdout.write(JSON.stringify(u,null,2)+`
|
|
988
|
+
`)}process.exit(0)}),r}import Qk from"better-sqlite3";var ea=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');this.db=new Qk(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}`)}}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 Du(t){return new ea(t)}import{readFile as Kk}from"node:fs/promises";var oe=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 F0=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var ta=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")e[r]={name:i};else if(F0(i)){if(typeof i.name!="string")throw new oe("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 oe("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${r}`])}return e};var Pu=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.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},Ru=Pu;var Mk=12,jk=13,Uk=10,qk=32,Hk=9,Q0=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!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 Ru(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new Ru(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([jk],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Uk],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Mk],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([qk],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Hk],"utf8").toString(),t.encoding)]}};var M0=function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})};var Nu=function(t){let e={};for(let n in t)e[M0(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 oe("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 oe("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 oe("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 oe("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=ta(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new oe("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 oe("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 oe("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 oe("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 oe("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let r=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new oe("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);if(e.delimiter=e.delimiter.map(function(n){if(n==null||n===!1)return Buffer.from(",",e.encoding);if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new oe("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 oe("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 oe("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 oe("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 oe("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 oe("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 oe("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 oe("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(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(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 j0=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},$k=13,Wk=10,Gn={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},U0=function(t={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=Nu(t);return{info:e,original_options:t,options:r,state:Q0(r),__needMoreData:function(n,i,s){if(s)return!1;let{encoding:o,escape:a,quote:l}=this.options,{quoting:u,needMoreDataSize:f,recordDelimiterMaxLength:c}=this.state,d=i-n-1,p=Math.max(f,c===0?Buffer.from(`\r
|
|
989
|
+
`,o).length:c,u?(a===null?0:a.length)+l.length:0,u?l.length+c:0);return d<p},parse:function(n,i,s,o){let{bom:a,comment_no_infix:l,encoding:u,from_line:f,ltrim:c,max_record_size:d,raw:p,relax_quotes:m,rtrim:g,skip_empty_lines:A,to:y,to_line:_}=this.options,{comment:b,escape:E,quote:v,record_delimiter:C}=this.options,{bomSkipped:O,previousBuf:M,rawBuffer:q,escapeIsQuote:F}=this.state,B;if(M===void 0)if(n===void 0){o();return}else B=n;else M!==void 0&&n===void 0?B=M:B=Buffer.concat([M,n]);if(O===!1)if(a===!1)this.state.bomSkipped=!0;else if(B.length<3){if(i===!1){this.state.previousBuf=B;return}}else{for(let D in Gn)if(Gn[D].compare(B,0,Gn[D].length)===0){let j=Gn[D].length;this.state.bufBytesStart+=j,B=B.slice(j),this.options=Nu({...this.original_options,encoding:D}),{comment:b,escape:E,quote:v}=this.options;break}this.state.bomSkipped=!0}let P=B.length,L;for(L=0;L<P&&!this.__needMoreData(L,P,i);L++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),_!==-1&&this.info.lines>_){this.state.stop=!0,o();return}this.state.quoting===!1&&C.length===0&&this.__autoDiscoverRecordDelimiter(B,L)&&(C=this.options.record_delimiter);let D=B[L];if(p===!0&&q.append(D),(D===$k||D===Wk)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(E!==null&&this.state.quoting===!0&&this.__isEscape(B,L,D)&&L+E.length<P)if(F){if(this.__isQuote(B,L+E.length)){this.state.escaping=!0,L+=E.length-1;continue}}else{this.state.escaping=!0,L+=E.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(B,L))if(this.state.quoting===!0){let H=B[L+v.length],Y=g&&this.__isCharTrimable(B,L+v.length),V=b!==null&&this.__compareBytes(b,B,L+v.length,H),Q=this.__isDelimiter(B,L+v.length,H),re=C.length===0?this.__autoDiscoverRecordDelimiter(B,L+v.length):this.__isRecordDelimiter(H,B,L+v.length);if(E!==null&&this.__isEscape(B,L,D)&&this.__isQuote(B,L+E.length))L+=E.length-1;else if(!H||Q||re||V||Y){this.state.quoting=!1,this.state.wasQuoting=!0,L+=v.length-1;continue}else if(m===!1){let ne=this.__error(new oe("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(H)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(ne!==void 0)return ne}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(v),L+=v.length-1}else if(this.state.field.length!==0){if(m===!1){let H=this.__infoField(),Y=Object.keys(Gn).map(Q=>Gn[Q].equals(this.state.field.toString())?Q:!1).filter(Boolean)[0],V=this.__error(new oe("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(H.column)} at line ${H.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,Y?`(${Y} bom)`:void 0],this.options,H,{field:this.state.field}));if(V!==void 0)return V}}else{this.state.quoting=!0,L+=v.length-1;continue}if(this.state.quoting===!1){let H=this.__isRecordDelimiter(D,B,L);if(H!==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(),L+=H-1;continue}if(A===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,L+=H-1;continue}this.info.bytes=this.state.bufBytesStart+L;let Q=this.__onField();if(Q!==void 0)return Q;this.info.bytes=this.state.bufBytesStart+L+H;let re=this.__onRecord(s);if(re!==void 0)return re;if(y!==-1&&this.info.records>=y){this.state.stop=!0,o();return}}this.state.commenting=!1,L+=H-1;continue}if(this.state.commenting)continue;if(b!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(b,B,L,D)!==0){this.state.commenting=!0;continue}let Y=this.__isDelimiter(B,L,D);if(Y!==0){this.info.bytes=this.state.bufBytesStart+L;let V=this.__onField();if(V!==void 0)return V;L+=Y-1;continue}}}if(this.state.commenting===!1&&d!==0&&this.state.record_length+this.state.field.length>d)return this.__error(new oe("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${d}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let j=c===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(B,L),K=g===!1||this.state.wasQuoting===!1;if(j===!0&&K===!0)this.state.field.append(D);else{if(g===!0&&!this.__isCharTrimable(B,L))return this.__error(new oe("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()));j===!1&&(L+=this.__isCharTrimable(B,L)-1);continue}}if(i===!0)if(this.state.quoting===!0){let D=this.__error(new oe("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(D!==void 0)return D}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+L;let D=this.__onField();if(D!==void 0)return D;let j=this.__onRecord(s);if(j!==void 0)return j}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=L,this.state.previousBuf=B.slice(L);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:u,relax_column_count_less:f,relax_column_count_more:c,raw:d,skip_records_with_empty_values:p}=this.options,{enabled:m,record:g}=this.state;if(m===!1)return this.__resetRecord();let A=g.length;if(i===!0){if(p===!0&&j0(g)){this.__resetRecord();return}return this.__firstLineToColumns(g)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=A),A!==this.state.expectedRecordLength){let y=i===!1?new oe("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${A} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g}):new oe("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${A} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g});if(u===!0||f===!0&&A<this.state.expectedRecordLength||c===!0&&A>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=y;else{let _=this.__error(y);if(_)return _}}if(p===!0&&j0(g)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,l===1||this.info.records>=l){let{objname:y}=this.options;if(i!==!1){let _={};for(let b=0,E=g.length;b<E;b++)i[b]===void 0||i[b].disabled||(s===!0&&_[i[b].name]!==void 0?Array.isArray(_[i[b].name])?_[i[b].name]=_[i[b].name].concat(g[b]):_[i[b].name]=[_[i[b].name],g[b]]:_[i[b].name]=g[b]);if(d===!0||a===!0){let b=Object.assign({record:_},d===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),E=this.__push(y===void 0?b:[_[y],b],n);if(E)return E}else{let b=this.__push(y===void 0?_:[_[y],_],n);if(b)return b}}else if(d===!0||a===!0){let _=Object.assign({record:g},d===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),b=this.__push(y===void 0?_:[g[y],_],n);if(b)return b}else{let _=this.__push(y===void 0?g:[g[y],g],n);if(_)return _}}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 oe("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=ta(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 u=this.state.field.toString(i);if(s===!0&&l===!1&&(u=u.trimRight()),n===!0){let[f,c]=this.__cast(u);if(f!==void 0)return f;u=c}this.state.record.push(u),o!==0&&typeof u=="string"&&(this.state.record_length+=u.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}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]},__isCharTrimable:function(n,i){return((o,a)=>{let{timchars:l}=this.state;e:for(let u=0;u<l.length;u++){let f=l[u];for(let c=0;c<f.length;c++)if(f[c]!==o[a+c])continue e;return f.length}return 0})(n,i)},__isFloat:function(n){return n-parseFloat(n)+1>=0},__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},__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 u=o[l];if(u[0]===s){for(let f=1;f<u.length;f++)if(u[f]!==n[i+f])continue e;return u.length}}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 u=o[l],f=u.length;if(u[0]===n){for(let c=1;c<f;c++)if(u[c]!==i[s+c])continue e;return u.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},__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},__autoDiscoverRecordDelimiter:function(n,i){let{encoding:s}=this.options,o=[Buffer.from(`\r
|
|
990
|
+
`,s),Buffer.from(`
|
|
991
|
+
`,s),Buffer.from("\r",s)];e:for(let a=0;a<o.length;a++){let l=o[a].length;for(let u=0;u<l;u++)if(o[a][u]!==n[i+u])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){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(a,s?this.state.rawBuffer.toString(i):void 0);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(),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);return{...this.__infoRecord(),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 q0=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],n=U0(e),i=l=>{n.options.objname===void 0?r.push(l):r[l[0]]=l[1]},s=()=>{},o=n.parse(t,!1,i,s);if(o!==void 0)throw o;let a=n.parse(void 0,!0,i,s);if(a!==void 0)throw a;return r};var ra=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 Kk(this.filePath,{encoding:this.encoding}),r=q0(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=r,this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>String(a[s??""])===String(o))}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Tu(t){return new ra(t)}import{readFile as Gk}from"node:fs/promises";var na=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 Gk(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=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Fu(t){return new na(t)}import{readFile as Jk}from"node:fs/promises";var ia=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 Jk(this.filePath,{encoding:"utf-8"}),r=Qr.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=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Qu(t){return new ia(t)}ms();import{stat as FO}from"node:fs/promises";import{basename as WA,dirname as QO,extname as MO}from"node:path";var Ea=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 ar(this.pattern,{nodir:!0}),r=[];for(let n of e)try{let i=await FO(n),s=MO(n);r.push({path:n,name:WA(n),basename:WA(n,s),ext:s.slice(1),dir:QO(n),size:i.size,mtime:i.mtime.toISOString()})}catch{continue}return this.data=r,this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function gf(t){return new Ea(t)}async function jO(t,e){if(e&&t.type in e)return e[t.type].create(t);switch(t.type){case"sqlite":return Du(t);case"csv":return Tu(t);case"json":return Fu(t);case"yaml":return Qu(t);case"glob":return gf(t);default:throw new Error(`Unknown datasource type: "${t.type}". Register custom types in datasources_dir.`)}}async function gs(t,e){let r={};if(t.datasources)for(let[n,i]of Object.entries(t.datasources))r[n]=await jO(i,e);return r}async function As(t){for(let e of Object.values(t))await e.close()}ms();import{readFile as iD,writeFile as sD}from"node:fs/promises";var h1=vn(u1(),1),XL={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function d1(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 Ta(t){let e=(0,h1.default)(t),r="";Object.keys(e.data).length>0&&e.matter&&(r=`---
|
|
992
|
+
${e.matter.trim()}
|
|
993
|
+
---
|
|
994
|
+
`);let n=e.content.replace(/^\n+/,"");return{data:e.data,content:n,raw:r}}function Fa(t,e){let r=[],{start:n,end:i}=e,s=Na(n),o=i?Na(i):"",a;i?a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${o}`,"g"):a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let l;i?l=new RegExp(`${s}\\s*@embedoc:end\\s*${o}`):l=new RegExp(`${s}\\s*@embedoc:end\\s*$`,"m");let u;for(;(u=a.exec(t))!==null;){let f=u.index,c=u[0],d=u[1],p=u[2]?.trim()??"",m=f+c.length,g=t.slice(m),A=l.exec(g);if(A){let y=A[0],_=m+A.index+y.length,b=g.slice(0,A.index);d&&r.push({startIndex:f,endIndex:_,templateName:d,params:d1(p),existingContent:b,startMarkerLine:c,endMarkerLine:y})}}return r}function Qa(t,e){let n={...XL,...e}[t];if(!n)throw new Error(`Unknown comment style: ${t}`);return n}function f1(t,e){return t.slice(0,e).split(`
|
|
995
|
+
`).length}function p1(t,e){let r=[],{start:n,end:i}=e,s=Na(n),o=i?Na(i):"",a,l;i?(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*${o})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${o}`,"g"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*${o}`)):(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*$`,"m"));let u;for(;(u=a.exec(t))!==null;){let f=u.index,c=u[0],d=u[1],p=u[2]?.trim()??"";if(!d||d==="end")continue;let g=d1(p).format??"yaml",A=f+c.length,y=t.slice(A);l.lastIndex=0;let _=l.exec(y);if(_){let b=y.slice(0,_.index),E=f1(t,f),v=f1(t,A+_.index+_[0].length);r.push({name:d,format:g,content:b,startLine:E,endLine:v,byteSize:Buffer.byteLength(b,"utf-8")})}}return r}function Na(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m1(t){return t==null?"":String(t).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function g1(){return{table(t,e){if(t.length===0)return"";let r=[],n="| "+t.map(m1).join(" | ")+" |";r.push(n);let i="| "+t.map(()=>"---").join(" | ")+" |";r.push(i);for(let s of e){let a="| "+t.map((l,u)=>m1(s[u])).join(" | ")+" |";r.push(a)}return r.join(`
|
|
996
|
+
`)},list(t,e=!1){return t.map((r,n)=>`${e?`${n+1}.`:"-"} ${r}`).join(`
|
|
997
|
+
`)},codeBlock(t,e=""){return"```"+e+`
|
|
998
|
+
`+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 A1 from"node:path";var Rf=["^```\\w*\\s*\\n?","\\n?```\\s*$"],ZL={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","js","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:Rf};function w1(t){return t.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function Nf(t,e){let r=w1(e),n=t;for(let i of r){if(n==null)return;n=n[i]}return n}function b1(t,e,r){let n=w1(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 eD(t){let e=t.indexOf(".");return e===-1?t:t.slice(0,e)}function tD(t,e){let r=t.trim();for(let n of e){let i=new RegExp(n);r=r.replace(i,"")}return r.trim()}function y1(t,e,r={},n){let{stripCodeFences:i=!0,stripPatterns:s}=r,o=t;i&&(o=tD(o,s??Rf));let a=o.trim();switch(e){case"yaml":return Qr.load(a,{schema:Qr.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return rD(a);case"table":return nD(a);case"text":return a;default:{let l=n?.[e];return l?l(a):a}}}function rD(t){let e=t.split(`
|
|
999
|
+
`).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(u=>u.trim()),l={};n.forEach((u,f)=>{l[u]=a[f]??""}),i.push(l)}return i}function nD(t){let e=t.split(`
|
|
1000
|
+
`).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,u={};n.forEach((f,c)=>{u[f]=l[c]??""}),i.push(u)}return i}var Pf=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,u)=>l.propertyPath===""?-1:u.propertyPath===""?1:l.propertyPath.localeCompare(u.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 Nf(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,r){if(!this._isObject)throw new Error("Cannot merge into array datasource");b1(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=A1.dirname(r);n=A1.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 _1(t,e,r={},n){let i={...ZL,...r},s=new Map,o={stripCodeFences:i.stripCodeFences,stripPatterns:r.stripPatterns??Rf},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=eD(l.name);a.has(f)||a.set(f,[]),a.get(f).push(l)}for(let[l,u]of a){let f=u.find(y=>y.name===l),c,d="yaml",p=0,m=0,g=0,A=[];f?(c=y1(f.content,f.format,o,n),d=f.format,p=f.startLine,m=f.endLine,g=f.byteSize,A.push({propertyPath:"",startLine:f.startLine,endLine:f.endLine,format:f.format})):c={};for(let y of u)if(y.name!==l&&y.name.startsWith(l+".")){let _=y.name.slice(l.length+1),b=y1(y.content,y.format,o,n);(typeof c!="object"||c===null)&&(c={}),b1(c,_,b),A.push({propertyPath:_,startLine:y.startLine,endLine:y.endLine,format:y.format}),(p===0||y.startLine<p)&&(p=y.startLine),y.endLine>m&&(m=y.endLine),g+=y.byteSize}s.set(l,new Pf(c,d,e,p,m,g,A))}return s}function oD(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("."),u=l[0];if(!u)return"";let f=r.get(u);if(f){let d=l.slice(1).join(".");if(d){let m=Nf(f.data,d);return m!=null?String(m):""}let p=f.data;return p!=null?String(p):""}let c=e;for(let d of l){if(c==null)return"";if(typeof c=="object")c=c[d];else return""}return c!=null?String(c):""});return n}async function aD(t,e,r,n,i,s,o=!1,a){let l={filePath:t,success:!0,markersUpdated:0,changed:!1};try{let u=Qa(r.comment_style,s.comment_styles),{data:f,content:c,raw:d}=Ta(e),p=d?d.split(`
|
|
1001
|
+
`).length-1:0,m=p1(c,u);for(let C of m)C.startLine+=p,C.endLine+=p;let g=_1(m,t,s.inline_datasource,a),A={...i};for(let[C,O]of g){if(C in A){let M=s.inline_datasource?.conflictPolicy??"warn";if(M==="error")throw new Error(`Inline datasource "${C}" conflicts with external datasource (conflict_policy: error)`);if(M==="prefer_external")continue;console.warn(`Warning: Inline datasource "${C}" overrides external datasource in ${t}`)}A[C]=O}let y=Fa(c,u);if(y.length===0&&m.length===0)return l;let _=g1(),b=c,E=[...y].sort((C,O)=>O.startIndex-C.startIndex);for(let C of E){let O=n[C.templateName];if(!O){console.warn(`Warning: Unknown embed "${C.templateName}" in ${t}`);continue}let q={params:oD(C.params,f,g),frontmatter:f,datasources:A,markdown:_,filePath:t,existingContent:C.existingContent},F=await O.render(q);if(F.content===null||F.content===void 0)continue;let P=C.params.inline==="true"?C.startMarkerLine+F.content+C.endMarkerLine:C.startMarkerLine+`
|
|
1002
|
+
`+F.content+`
|
|
1003
|
+
`+C.endMarkerLine;b=b.slice(0,C.startIndex)+P+b.slice(C.endIndex),l.markersUpdated++}let v=d+b;if(v!==e&&(l.changed=!0,!o)){let O=(s.output?.line_ending??"lf")==="crlf"?v.replace(/\n/g,`\r
|
|
1004
|
+
`):v;await sD(t,O,{encoding:s.output?.encoding??"utf-8"})}for(let C of g.values())await C.close()}catch(u){l.success=!1,l.error=u instanceof Error?u:new Error(String(u))}return l}async function lD(t){return await ar(t.pattern,{ignore:t.exclude??[],nodir:!0})}async function Tf(t,e,r,n={}){let i=Date.now(),s=[];for(let a of t.targets){let l;n.specificFiles&&n.specificFiles.length>0?l=n.specificFiles.filter(u=>u.endsWith(a.pattern.split("*").pop()??"")):l=await lD(a);for(let u of l){n.verbose&&console.log(`Processing: ${u}`);try{let f=await iD(u,{encoding:"utf-8"}),c=await aD(u,f,a,e,r,t,n.dryRun,n.customInlineFormats);s.push(c),n.verbose&&c.markersUpdated>0&&console.log(` Updated ${c.markersUpdated} marker(s)${c.changed?" (changed)":" (no changes)"}`)}catch(f){s.push({filePath:u,success:!1,markersUpdated:0,changed:!1,error:f instanceof Error?f:new Error(String(f))}),n.verbose&&console.error(` Error: ${f}`)}}}let o=Date.now()-i;return{totalFiles:s.length,successFiles:s.filter(a=>a.success).length,failedFiles:s.filter(a=>!a.success).length,totalMarkersUpdated:s.reduce((a,l)=>a+l.markersUpdated,0),results:s,duration:o}}var nt=vn(f_(),1);import{readFile as e4,writeFile as t4,mkdir as r4,access as n4}from"node:fs/promises";import{dirname as i4,join as s4}from"node:path";function o4(){nt.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),nt.default.registerHelper("datetime",()=>new Date().toISOString()),nt.default.registerHelper("eq",(t,e)=>t===e),nt.default.registerHelper("ne",(t,e)=>t!==e),nt.default.registerHelper("gt",(t,e)=>t>e),nt.default.registerHelper("lt",(t,e)=>t<e),nt.default.registerHelper("and",(...t)=>(t.pop(),t.every(Boolean))),nt.default.registerHelper("or",(...t)=>(t.pop(),t.some(Boolean))),nt.default.registerHelper("json",t=>JSON.stringify(t,null,2)),nt.default.registerHelper("uppercase",t=>String(t??"").toUpperCase()),nt.default.registerHelper("lowercase",t=>String(t??"").toLowerCase()),nt.default.registerHelper("capitalize",t=>{let e=String(t??"");return e.charAt(0).toUpperCase()+e.slice(1)}),nt.default.registerHelper("replace",(t,e,r)=>String(t??"").replace(new RegExp(e,"g"),r))}o4();async function a4(t,e){let r=await e4(t,{encoding:"utf-8"});return nt.default.compile(r)(e)}function l4(t,e){return t.replace(/\{([^}]+)\}/g,(r,n)=>{let i=e[n];return i!=null?String(i):""})}async function c4(t){try{return await n4(t),!0}catch{return!1}}async function u4(t,e,r,n,i=!1){let s=l4(e.output_path,t),o={filePath:s,success:!0,skipped:!1};try{if(await c4(s)&&!e.overwrite)return o.skipped=!0,o;let l=s4(r,e.template),u=await a4(l,t);if(!i){await r4(i4(s),{recursive:!0});let c=(n.output?.line_ending??"lf")==="crlf"?u.replace(/\n/g,`\r
|
|
1005
|
+
`):u;await t4(s,c,{encoding:n.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}async function f4(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)){i.verbose&&console.log(` Generator: ${l.template}`);for(let u of a){let f=await u4(u,l,o,n,i.dryRun);s.push(f),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}`))}}return s}async function h_(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(`
|
|
1006
|
+
Processing datasource: ${i}`);let a=await f4(i,s,o,t,r);n.push(...a)}return n}ms();import{readFile as h4}from"node:fs/promises";import{resolve as Vt,relative as Oh}from"node:path";var yi=class{nodes=new Map;config;renderersDir;embeds;constructor(e,r){this.config=e,this.embeds=r,this.renderersDir=Vt(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,r){let n=Vt(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(Vt(e)),i=this.nodes.get(Vt(r));n&&i&&(n.dependsOn.add(i.path),i.dependedBy.add(n.path))}async analyzeDocument(e,r){let n=Vt(e),i=this.getOrCreateNode("document",n);try{let s=await h4(n,{encoding:"utf-8"}),o=Qa(r.comment_style,this.config.comment_styles),{content:a}=Ta(s),l=Fa(a,o),u=new Set(l.map(f=>f.templateName));for(let f of u){let c=this.embeds[f];if(c){let d=`embed:${f}`,p=this.getOrCreateNode("embed",d);if(i.dependsOn.add(p.path),p.dependedBy.add(i.path),c.dependsOn)for(let m of c.dependsOn){let g=this.config.datasources?.[m];if(g?.path){let A=Vt(g.path),y=this.getOrCreateNode("datasource",A);p.dependsOn.add(y.path),y.dependedBy.add(p.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let r=await ar(e.pattern,{ignore:e.exclude??[],nodir:!0});for(let n of r)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let r=Vt(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(Vt(l)),!i){let u=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");i=this.nodes.get(Vt(`embed:${u}`))}}}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 u=this.nodes.get(l);u&&!s.has(l)&&o.push(u)}}}return Array.from(n)}getWatchPaths(){let e=[];if(this.config.datasources)for(let r of Object.values(this.config.datasources))r.path&&e.push(Vt(r.path));return e.push(this.renderersDir),e}dump(){console.log(`
|
|
1007
|
+
=== Dependency Graph ===`);for(let[e,r]of this.nodes){if(console.log(`
|
|
1008
|
+
[${r.type}] ${Oh(process.cwd(),e)}`),r.dependsOn.size>0){console.log(" depends on:");for(let n of r.dependsOn)console.log(` - ${Oh(process.cwd(),n)}`)}if(r.dependedBy.size>0){console.log(" depended by:");for(let n of r.dependedBy)console.log(` - ${Oh(process.cwd(),n)}`)}}}};var m4={version:"0.14.0"};async function Lh(t){let e=Yt(t),r=await m_(e,{encoding:"utf-8"});return t.endsWith(".json")?JSON.parse(r):Qr.load(r)}async function wi(t){try{return await d4(t),!0}catch{return!1}}function p_(t){return t.renderers_dir?t.renderers_dir:t.embeds_dir?(console.warn(te.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),t.embeds_dir):".embedoc/renderers"}async function Dh(t){let e=Yt(t,"index.ts"),r=Yt(t,"index.js");try{if(await wi(e)){let n=await pu(e,import.meta.url);return n.embeds??n.default?.embeds??{}}return await wi(r)?(await import(g_(r).href)).embeds??{}:{}}catch(n){let i=n instanceof Error?n.message:String(n);return console.warn(te.default.yellow(`Warning: Could not load renderers from ${t}: ${i}`)),{}}}async function Ph(t){let e=Yt(t,"index.ts"),r=Yt(t,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let i;return await wi(e)?i=await pu(e,import.meta.url):await wi(r)&&(i=await import(g_(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);return console.warn(te.default.yellow(`Warning: Could not load custom datasources from ${t}: ${s}`)),n}}var g4={init:async t=>{try{console.log(te.default.cyan(`\u{1F4C1} Initializing embedoc...
|
|
1009
|
+
`));let e=[],r=[],n=async(l,u)=>{let f=Yt(l);if(!t.force&&await wi(f)){r.push(l);return}let c=f.substring(0,f.lastIndexOf("/"));await p4(c,{recursive:!0}),await d_(f,u,{encoding:"utf-8"}),e.push(l)};await n("embedoc.config.yaml",`version: "1.0"
|
|
1010
|
+
|
|
1011
|
+
targets:
|
|
1012
|
+
- pattern: "./docs/**/*.md"
|
|
1013
|
+
comment_style: html
|
|
1014
|
+
exclude:
|
|
1015
|
+
- "**/node_modules/**"
|
|
1016
|
+
- "**/.git/**"
|
|
1017
|
+
|
|
1018
|
+
datasources: {}
|
|
1019
|
+
# example_db:
|
|
1020
|
+
# type: sqlite
|
|
1021
|
+
# path: "./data/example.db"
|
|
1022
|
+
# example_csv:
|
|
1023
|
+
# type: csv
|
|
1024
|
+
# path: "./data/example.csv"
|
|
1025
|
+
`),await n(".embedoc/renderers/index.ts",`/**
|
|
1026
|
+
* embedoc renderers
|
|
1027
|
+
*
|
|
1028
|
+
* Export your custom renderers here.
|
|
1029
|
+
* Each key becomes a marker name: <!--@embedoc:key_name ...-->
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
1032
|
+
// import myRenderer from './my_renderer.ts';
|
|
1033
|
+
|
|
1034
|
+
export const embeds = {
|
|
1035
|
+
// my_renderer: myRenderer,
|
|
1036
|
+
};
|
|
1037
|
+
`),await n(".embedoc/datasources/index.ts",`/**
|
|
1038
|
+
* embedoc custom datasources and inline format parsers
|
|
1039
|
+
*
|
|
1040
|
+
* datasourceTypes: register custom datasource types usable in embedoc.config.yaml
|
|
1041
|
+
* inlineFormats: register custom parsers for @embedoc-data format="xxx" markers
|
|
1042
|
+
*/
|
|
1043
|
+
|
|
1044
|
+
// import type { CustomDatasourceDefinition, InlineFormatParser } from 'embedoc';
|
|
1045
|
+
// import myDatasource from './my_datasource.ts';
|
|
1046
|
+
|
|
1047
|
+
export const datasourceTypes = {
|
|
1048
|
+
// my_datasource: myDatasource,
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
export const inlineFormats = {
|
|
1052
|
+
// toml: (content: string) => parseToml(content),
|
|
1053
|
+
};
|
|
1054
|
+
`),await n(".embedoc/templates/.gitkeep","");let a=Yt("package.json");if(await wi(a)){let l=await m_(a,{encoding:"utf-8"}),u=JSON.parse(l),f=u.scripts??{},c=!1,d=[["embedoc:build","embedoc build"],["embedoc:watch","embedoc watch"],["embedoc:generate","embedoc generate --all"]];for(let[p,m]of d)p in f||(f[p]=m,c=!0);if(c){u.scripts=f,await d_(a,JSON.stringify(u,null,2)+`
|
|
1055
|
+
`,{encoding:"utf-8"}),console.log(te.default.green(" Updated package.json scripts:"));for(let[p,m]of d)l.includes(`"${p}"`)||console.log(te.default.gray(` "${p}": "${m}"`));console.log("")}}if(e.length>0){console.log(te.default.green(" Created:"));for(let l of e)console.log(te.default.gray(` ${l}`))}if(r.length>0){console.log(te.default.yellow(" Skipped (already exists):"));for(let l of r)console.log(te.default.gray(` ${l}`))}console.log(""),console.log(te.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(te.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(te.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(te.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(te.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(te.default.cyan("\u{1F527} Loading configuration..."));let n=await Lh(e.config??"embedoc.config.yaml"),i=n.datasources_dir??".embedoc/datasources",s=await Ph(i);console.log(te.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await gs(n,s.datasourceTypes);console.log(te.default.cyan("\u{1F4DD} Loading renderers..."));let a=p_(n),l=await Dh(a);console.log(te.default.cyan("\u{1F504} Processing files..."));let u=await Tf(n,l,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:t.length>0?t:void 0,customInlineFormats:s.inlineFormats});await As(o);let f=Date.now()-r;console.log(""),console.log(te.default.green("\u2705 Build completed!")),console.log(` Files processed: ${u.totalFiles}`),console.log(` Markers updated: ${u.totalMarkersUpdated}`),console.log(` Success: ${u.successFiles}`),u.failedFiles>0&&console.log(te.default.red(` Failed: ${u.failedFiles}`)),console.log(` Duration: ${f}ms`),e.dryRun&&console.log(te.default.yellow(`
|
|
1056
|
+
(Dry run - no files were modified)`));for(let c of u.results)!c.success&&c.error&&(console.error(te.default.red(`
|
|
1057
|
+
Error in ${c.filePath}:`)),console.error(` ${c.error.message}`));process.exit(u.failedFiles>0?1:0)}catch(n){console.error(te.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(te.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(te.default.cyan("\u{1F527} Loading configuration..."));let r=await Lh(t.config??"embedoc.config.yaml"),n=r.datasources_dir??".embedoc/datasources",i=await Ph(n);console.log(te.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await gs(r,i.datasourceTypes);console.log(te.default.cyan("\u{1F4C4} Generating files..."));let o=await h_(r,s,{dryRun:t.dryRun,verbose:t.verbose,datasourceName:t.datasource,generatorName:t.generator});await As(s);let a=Date.now()-e,l=o.filter(c=>c.success&&!c.skipped).length,u=o.filter(c=>c.skipped).length,f=o.filter(c=>!c.success).length;console.log(""),console.log(te.default.green("\u2705 Generation completed!")),console.log(` Generated: ${l}`),console.log(` Skipped (existing): ${u}`),f>0&&console.log(te.default.red(` Failed: ${f}`)),console.log(` Duration: ${a}ms`),t.dryRun&&console.log(te.default.yellow(`
|
|
1058
|
+
(Dry run - no files were created)`));for(let c of o)!c.success&&c.error&&(console.error(te.default.red(`
|
|
1059
|
+
Error for ${c.filePath}:`)),console.error(` ${c.error.message}`));process.exit(f>0?1:0)}catch(r){console.error(te.default.red("\u274C Generation failed:")),console.error(r instanceof Error?r.message:String(r)),process.exit(1)}},watch:async t=>{try{console.log(te.default.cyan("\u{1F527} Loading configuration..."));let e=await Lh(t.config??"embedoc.config.yaml"),r=e.datasources_dir??".embedoc/datasources",n=await Ph(r);console.log(te.default.cyan("\u{1F4E6} Initializing datasources..."));let i=await gs(e,n.datasourceTypes);console.log(te.default.cyan("\u{1F4DD} Loading renderers..."));let s=Yt(p_(e)),o=await Dh(s);console.log(te.default.cyan("\u{1F517} Building dependency graph..."));let a=new yi(e,o);await a.build(),t.debugDeps&&a.dump();let l=e.targets.map(g=>g.pattern),u=a.getWatchPaths();console.log(te.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${l.join(", ")}`),u.length>0&&console.log(` Additional paths: ${u.map(g=>Bh(process.cwd(),g)).join(", ")}`);let f=yp.watch([...l,...u],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),c=null,d=new Map,p=async()=>{let g=new Map(d);d.clear();let A=!1;for(let[_]of g)if(_.startsWith(s)&&_.endsWith(".ts")){console.log(te.default.yellow(`
|
|
1060
|
+
\u{1F504} Renderer changed: ${Bh(process.cwd(),_)}`)),console.log(te.default.cyan(" Reloading renderers..."));try{o=await Dh(s),A=!0}catch(b){console.error(te.default.red(" Failed to reload renderers:"),b);return}}A&&(console.log(te.default.cyan(" Rebuilding dependency graph...")),a=new yi(e,o),await a.build());let y=new Set;for(let[_]of g){let b=a.getAffectedDocuments(_);for(let E of b)y.add(E)}if(y.size===0)for(let[_]of g){let b=Yt(_);for(let E of e.targets){let{glob:v}=await Promise.resolve().then(()=>(ms(),$A));if((await v(E.pattern,{absolute:!0})).includes(b)){y.add(b);break}}}if(y.size===0){console.log(te.default.gray(`
|
|
1061
|
+
No affected documents found`));return}console.log(te.default.yellow(`
|
|
1062
|
+
\u{1F4DD} Rebuilding ${y.size} document(s)...`));for(let _ of y)console.log(te.default.gray(` - ${Bh(process.cwd(),_)}`));try{await As(i),i=await gs(e,n.datasourceTypes);let _=await Tf(e,o,i,{verbose:t.verbose,specificFiles:Array.from(y),customInlineFormats:n.inlineFormats});_.totalMarkersUpdated>0?console.log(te.default.green(` \u2705 Updated ${_.totalMarkersUpdated} marker(s)`)):console.log(te.default.gray(" No markers updated")),a=new yi(e,o),await a.build()}catch(_){console.error(te.default.red(" \u274C Error:"),_)}},m=g=>A=>{d.set(Yt(A),g),c&&clearTimeout(c),c=setTimeout(p,200)};f.on("change",m("change")),f.on("add",m("add")),process.on("SIGINT",async()=>{console.log(te.default.cyan(`
|
|
1063
|
+
|
|
1064
|
+
\u{1F44B} Stopping watch...`)),await f.close(),await As(i),process.exit(0)})}catch(e){console.error(te.default.red("\u274C Watch failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}}};T0(g4,m4.version).parse();
|
|
1065
|
+
/*! Bundled license information:
|
|
1066
|
+
|
|
1067
|
+
is-extendable/index.js:
|
|
1068
|
+
(*!
|
|
1069
|
+
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
1070
|
+
*
|
|
1071
|
+
* Copyright (c) 2015, Jon Schlinkert.
|
|
1072
|
+
* Licensed under the MIT License.
|
|
1073
|
+
*)
|
|
1074
|
+
|
|
1075
|
+
strip-bom-string/index.js:
|
|
1076
|
+
(*!
|
|
1077
|
+
* strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
|
|
1078
|
+
*
|
|
1079
|
+
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
1080
|
+
* Released under the MIT License.
|
|
1081
|
+
*)
|
|
1082
|
+
|
|
1083
|
+
js-yaml/dist/js-yaml.mjs:
|
|
1084
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
1085
|
+
|
|
1086
|
+
chokidar/esm/index.js:
|
|
1087
|
+
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
1088
|
+
*/
|
|
1089
|
+
//# sourceMappingURL=embedoc.bundle.mjs.map
|