feat(val-blog): add 2026-04-30 dream journey post
This commit is contained in:
1 parent
691f96e8a6
commit
81978704fc
941 files changed
+195468
-755
No files matched your search
+217
@@ -0,0 +1,217 @@
|
||||
"use strict";var o_=Object.create;var bs=Object.defineProperty;var a_=Object.getOwnPropertyDescriptor;var l_=Object.getOwnPropertyNames;var c_=Object.getPrototypeOf,u_=Object.prototype.hasOwnProperty;var O=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hf=(i,e)=>{for(var t in e)bs(i,t,{get:e[t],enumerable:!0})},Gf=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l_(e))!u_.call(i,n)&&n!==t&&bs(i,n,{get:()=>e[n],enumerable:!(r=a_(e,n))||r.enumerable});return i};var He=(i,e,t)=>(t=i!=null?o_(c_(i)):{},Gf(e||!i||!i.__esModule?bs(t,"default",{value:i,enumerable:!0}):t,i)),f_=i=>Gf(bs({},"__esModule",{value:!0}),i);var zf=O((mI,Kf)=>{var Yf={};Kf.exports=Yf;var Wf={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Wf).forEach(function(i){var e=Wf[i],t=Yf[i]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var Zf=O((gI,Jf)=>{"use strict";Jf.exports=function(i,e){e=e||process.argv;var t=e.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=e.indexOf(r+i);return n!==-1&&(t===-1?!0:n<t)}});var Xf=O((yI,Qf)=>{"use strict";var h_=require("os"),Ut=Zf(),lt=process.env,vr=void 0;Ut("no-color")||Ut("no-colors")||Ut("color=false")?vr=!1:(Ut("color")||Ut("colors")||Ut("color=true")||Ut("color=always"))&&(vr=!0);"FORCE_COLOR"in lt&&(vr=lt.FORCE_COLOR.length===0||parseInt(lt.FORCE_COLOR,10)!==0);function p_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function d_(i){if(vr===!1)return 0;if(Ut("color=16m")||Ut("color=full")||Ut("color=truecolor"))return 3;if(Ut("color=256"))return 2;if(i&&!i.isTTY&&vr!==!0)return 0;var e=vr?1:0;if(process.platform==="win32"){var t=h_.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in lt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in lt})||lt.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in lt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(lt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in lt){var r=parseInt((lt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(lt.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(lt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(lt.TERM)||"COLORTERM"in lt?1:(lt.TERM==="dumb",e)}function Ta(i){var e=d_(i);return p_(e)}Qf.exports={supportsColor:Ta,stdout:Ta(process.stdout),stderr:Ta(process.stderr)}});var th=O((vI,eh)=>{eh.exports=function(e,t){var r="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var o=n[s]||[" "],a=Math.floor(Math.random()*o.length);typeof n[s]!="undefined"?r+=n[s][a]:r+=s}),r}});var rh=O((bI,ih)=>{ih.exports=function(e,t){e=e||" he is here ";var r={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031Line truncated
|
||||
`)!=-1,r=this._styles,n=r.length;n--;){var s=Wi[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(g_,function(o){return s.close+o+s.open}))}return e}ye.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in i)(function(t){ye[t]=function(r){if(typeof i[t]=="object"){var n=r;for(var s in i[t])n=ye[i[t][s]](n);return n}return ye[i[t]](r)}})(e)};function w_(){var i={};return Object.keys(mh).forEach(function(e){i[e]={get:function(){return dh([e])}}}),i}var x_=function(e,t){var r=t.split("");return r=r.map(e),r.join("")};ye.trap=th();ye.zalgo=rh();ye.maps={};ye.maps.america=sh()(ye);ye.maps.zebra=ah()(ye);ye.maps.rainbow=ch()(ye);ye.maps.random=fh()(ye);for(hh in ye.maps)(function(i){ye[i]=function(e){return x_(ye.maps[i],e)}})(hh);var hh;ph(ye,w_())});var bh=O((kI,vh)=>{var S_=yh();vh.exports=S_});var wh=O((CI,_h)=>{var br=1e3,_r=br*60,wr=_r*60,Yi=wr*24,E_=Yi*7,O_=Yi*365.25;_h.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return k_(i);if(t==="number"&&isFinite(i))return e.long?T_(i):C_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function k_(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*O_;case"weeks":case"week":case"w":return t*E_;case"days":case"day":case"d":return t*Yi;case"hours":case"hour":case"hrs":case"hr":case"h":return t*wr;case"minutes":case"minute":case"mins":case"min":case"m":return t*_r;case"seconds":case"second":case"secs":case"sec":case"s":return t*br;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function C_(i){var e=Math.abs(i);return e>=Yi?Math.round(i/Yi)+"d":e>=wr?Math.round(i/wr)+"h":e>=_r?Math.round(i/_r)+"m":e>=br?Math.round(i/br)+"s":i+"ms"}function T_(i){var e=Math.abs(i);return e>=Yi?_s(i,e,Yi,"day"):e>=wr?_s(i,e,wr,"hour"):e>=_r?_s(i,e,_r,"minute"):e>=br?_s(i,e,br,"second"):i+" ms"}function _s(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Aa=O((TI,xh)=>{function A_(i){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=o,t.humanize=wh(),t.destroy=c,Object.keys(i).forEach(u=>{t[u]=i[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let d=0;d<u.length;d++)f=(f<<5)-f+u.charCodeAt(d),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,d=null,g,y;function m(...b){if(!m.enabled)return;let w=m,x=Number(new Date),_=x-(f||x);w.diff=_,w.prev=f,w.curr=x,f=x,b[0]=t.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let k=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";k++;let N=t.formatters[T];if(typeof N=="function"){let C=b[k];R=N.call(w,C),b.splice(k,1),k--}return R}),t.formatArgs.call(w,b),(w.log||t.log).apply(w,b)}return m.namespace=u,m.useColors=t.useColors(),m.color=t.selectColor(u),m.extend=r,m.destroy=t.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==t.namespaces&&(g=t.namespaces,y=t.enabled(u)),y),set:b=>{d=b}}),typeof t.init=="function"&&t.init(m),m}function r(u,f){let d=t(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),g=d.length;for(f=0;f<g;f++)d[f]&&(u=d[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=t.skips.length;f<d;f++)if(t.skips[f].test(u))return!1;for(f=0,d=t.names.length;f<d;f++)if(t.names[f].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}xh.exports=A_});var Sh=O((xt,ws)=>{xt.formatArgs=N_;xt.save=B_;xt.load=L_;xt.useColors=I_;xt.storage=P_();xt.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();xt.colors=["#0000CC","#000
Line truncated
|
||||
`).join(`
|
||||
`+s),i.push(n+"m+"+Es.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=V_()+e+" "+i[0]}function V_(){return tt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function H_(...i){return process.stderr.write(Ss.format(...i)+`
|
||||
`)}function G_(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function W_(){return process.env.DEBUG}function Y_(i){i.inspectOpts={};let e=Object.keys(tt.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=tt.inspectOpts[e[t]]}Es.exports=Aa()(tt);var{formatters:Ah}=Es.exports;Ah.o=function(i){return this.inspectOpts.colors=this.useColors,Ss.inspect(i,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};Ah.O=function(i){return this.inspectOpts.colors=this.useColors,Ss.inspect(i,this.inspectOpts)}});var nn=O((NI,Na)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Na.exports=Sh():Na.exports=Ih()});var Rh=O((BI,Ph)=>{var{hasOwnProperty:Ba}=Object.prototype,La=(i,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process!="undefined"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
|
||||
`:`
|
||||
`,r=e.whitespace?" = ":"=",n=[],s=e.sort?Object.keys(i).sort():Object.keys(i),o=0;e.align&&(o=oi(s.filter(c=>i[c]===null||Array.isArray(i[c])||typeof i[c]!="object").map(c=>Array.isArray(i[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>oi(c).length>=oi(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of s){let u=i[c];if(u&&Array.isArray(u))for(let f of u)a+=oi(`${c}${l}`).padEnd(o," ")+r+oi(f)+t;else u&&typeof u=="object"?n.push(c):a+=oi(c).padEnd(o," ")+r+oi(u)+t}e.section&&a.length&&(a="["+oi(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of n){let u=Bh(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=La(i[c],{...e,section:f});a.length&&d.length&&(a+=t),a+=d}return a};function Bh(i,e){var t=0,r=0,n=0,s=[];do if(n=i.indexOf(e,t),n!==-1){if(t=n+e.length,n>0&&i[n-1]==="\\")continue;s.push(i.slice(r,n)),r=n+e.length}while(n!==-1);return s.push(i.slice(r)),s}var Nh=(i,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=i.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(s);if(!u)continue;if(u[1]!==void 0){if(n=Os(u[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let f=Os(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=((a==null?void 0:a[f])||0)+1,d=a[f]>1);let g=d&&f.endsWith("[]")?f.slice(0,-2):f;if(g==="__proto__")continue;let y=u[3]?Os(u[4]):!0,m=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;d&&(Ba.call(r,g)?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]),Array.isArray(r[g])?r[g].push(m):r[g]=m}let l=[];for(let c of Object.keys(t)){if(!Ba.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=Bh(c,".");r=t;let f=u.pop(),d=f.replace(/\\\./g,".");for(let g of u)g!=="__proto__"&&((!Ba.call(r,g)||typeof r[g]!="object")&&(r[g]=Object.create(null)),r=r[g]);r===t&&d===f||(r[d]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Lh=i=>i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"),oi=i=>typeof i!="string"||i.match(/[=\r\n]/)||i.match(/^\[/)||i.length>1&&Lh(i)||i!==i.trim()?JSON.stringify(i):i.split(";").join("\\;").split("#").join("\\#"),Os=i=>{if(i=(i||"").trim(),Lh(i)){i.charAt(0)==="'"&&(i=i.slice(1,-1));try{i=JSON.parse(i)}catch{}}else{let e=!1,t="";for(let r=0,n=i.length;r<n;r++){let s=i.charAt(r);if(e)"\\;#".indexOf(s)!==-1?t+=s:t+="\\"+s,e=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?e=!0:t+=s}}return e&&(t+="\\"),t.trim()}return i};Ph.exports={parse:Nh,decode:Nh,stringify:La,encode:La,safe:oi,unsafe:Os}});var ip=O((k2,ew)=>{ew.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var op=O((C2,ai)=>{var ll=require("fs"),cl=require("path"),tw=require("os"),iw=require("crypto"),rw=ip(),ul=rw.version,nw=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function sw(i){let e={},t=i.toString();t=t.replace(/\r\n?/mg,`
|
||||
`);let r;for(;(r=nw.exec(t))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
||||
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function ow(i){let e=sp(i),t=Ge.configDotenv({path:e});if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=np(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),l=cw(t,a);s=Ge.decrypt(l.ciphertext,l.key);break}catch(a){if(o+1>=n)throw a}return Ge.parse(s)}function aw(i){console.log(`[dotenv@${ul}][INFO] ${i}`)}function lw(i){console.log(`[dotenv@${ul}][WARN] ${i}`)}function Bs(i){console.log(`[dotenv@${ul}][DEBUG] ${i}`)}function np(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cw(i,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function sp(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)ll.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=cl.resolve(process.cwd(),".env.vault");return ll.existsSync(e)?e:null}function rp(i){return i[0]==="~"?cl.join(tw.homedir(),i.slice(1)):i}function uw(i){aw("Loading env from encrypted .env.vault");let e=Ge._parseVault(i),t=process.env;return i&&i.processEnv!=null&&(t=i.processEnv),Ge.populate(t,e,i),{parsed:e}}function fw(i){let e=cl.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug);i&&i.encoding?t=i.encoding:r&&Bs("No encoding is specified. UTF-8 is used by default");let n=[e];if(i&&i.path)if(!Array.isArray(i.path))n=[rp(i.path)];else{n=[];for(let l of i.path)n.push(rp(l))}let s,o={};for(let l of n)try{let c=Ge.parse(ll.readFileSync(l,{encoding:t}));Ge.populate(o,c,i)}catch(c){r&&Bs(`Failed to load ${l} ${c.message}`),s=c}let a=process.env;return i&&i.processEnv!=null&&(a=i.processEnv),Ge.populate(a,o,i),s?{parsed:o,error:s}:{parsed:o}}function hw(i){if(np(i).length===0)return Ge.configDotenv(i);let e=sp(i);return e?Ge._configVault(i):(lw(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Ge.configDotenv(i))}function pw(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=iw.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,l=o.message==="Invalid key length",c=o.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw o}}function dw(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&Bs(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var Ge={configDotenv:fw,_configVault:uw,_parseVault:ow,config:hw,decrypt:pw,parse:sw,populate:dw};ai.exports.configDotenv=Ge.configDotenv;ai.exports._configVault=Ge._configVault;ai.exports._parseVault=Ge._parseVault;ai.exports.config=Ge.config;ai.exports.decrypt=Ge.decrypt;ai.exports.parse=Ge.parse;ai.exports.populate=Ge.populate;ai.exports=Ge});var up=O(mt=>{"use strict";var vw=mt&&mt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),bw=mt&&mt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),lp=mt&&mt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&vw(e,i,t);return bw(e,i),e};Object.defineProperty(mt,"__esModule",{value:!0});mt.req=mt.json=mt.toBuffer=void 0;var _w=lp(require("http")),w
Line truncated
|
||||
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new kw.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],n=r.indexOf(t);n!==-1&&(r.splice(n,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Cw.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let n={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(n),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(s,o),a instanceof fp.Agent)try{return a.addRequest(e,n)}catch(l){return r(l)}this[Kt].currentSocket=a,super.createSocket(e,t,r)},a=>{this.decrementSockets(s,o),r(a)})}createConnection(){let e=this[Kt].currentSocket;if(this[Kt].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return(e=this[Kt].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[Kt]&&(this[Kt].defaultPort=e)}get protocol(){var e;return(e=this[Kt].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[Kt]&&(this[Kt].protocol=e)}};St.Agent=hl});var dp=O(Er=>{"use strict";var Tw=Er&&Er.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Er,"__esModule",{value:!0});Er.parseProxyResponse=void 0;var Aw=Tw(nn()),Ls=(0,Aw.default)("https-proxy-agent:parse-proxy-response");function Iw(i){return new Promise((e,t)=>{let r=0,n=[];function s(){let u=i.read();u?c(u):i.once("readable",s)}function o(){i.removeListener("end",a),i.removeListener("error",l),i.removeListener("readable",s)}function a(){o(),Ls("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}function l(u){o(),Ls("onerror %o",u),t(u)}function c(u){n.push(u),r+=u.length;let f=Buffer.concat(n,r),d=f.indexOf(`\r
|
||||
\r
|
||||
`);if(d===-1){Ls("have not received end of HTTP headers yet..."),s();return}let g=f.slice(0,d).toString("ascii").split(`\r
|
||||
`),y=g.shift();if(!y)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let m=y.split(" "),b=+m[1],w=m.slice(2).join(" "),x={};for(let _ of g){if(!_)continue;let k=_.indexOf(":");if(k===-1)return i.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${_}"`));let S=_.slice(0,k).toLowerCase(),R=_.slice(k+1).trimStart(),T=x[S];typeof T=="string"?x[S]=[T,R]:Array.isArray(T)?T.push(R):x[S]=R}Ls("got proxy server response: %o %o",y,x),o(),e({connect:{statusCode:b,statusText:w,headers:x},buffered:f})}i.on("error",l),i.on("end",a),s()})}Er.parseProxyResponse=Iw});var _p=O(It=>{"use strict";var Nw=It&&It.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Bw=It&&It.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),vp=It&&It.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Nw(e,i,t);return Bw(e,i),e},bp=It&&It.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(It,"__esModule",{value:!0});It.HttpsProxyAgent=void 0;var Ps=vp(require("net")),mp=vp(require("tls")),Lw=bp(require("assert")),Pw=bp(nn()),Rw=pl(),Mw=require("url"),Dw=dp(),un=(0,Pw.default)("https-proxy-agent"),gp=i=>i.servername===void 0&&i.host&&!Ps.isIP(i.host)?{...i,servername:i.host}:i,Rs=class extends Rw.Agent{constructor(e,t){var s;super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new Mw.URL(e):e,this.proxyHeaders=(s=t==null?void 0:t.headers)!=null?s:{},un("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?yp(t,"headers"):null,host:r,port:n}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let n;r.protocol==="https:"?(un("Creating `tls.Socket`: %o",this.connectOpts),n=mp.connect(gp(this.connectOpts))):(un("Creating `net.Socket`: %o",this.connectOpts),n=Ps.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Ps.isIPv6(t.host)?`[${t.host}]`:t.host,a=`CONNECT ${o}:${t.port} HTTP/1.1\r
|
||||
`;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${t.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
|
||||
`;let l=(0,Dw.parseProxyResponse)(n);n.write(`${a}\r
|
||||
`);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",qw),t.secureEndpoint?(un("Upgrading socket connection to TLS"),mp.connect({...yp(gp(t),"host","path","port"),socket:n})):n;n.destroy();let f=new Ps.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{un("Replaying proxy buffer for failed request"),(0,Lw.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),f}};Rs.protocols=["http","https"];It.HttpsProxyAgent=Rs;function qw(i){i.resume()}function yp(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var Sp=O((L2,Ms)=>{var xp=xp||function(i){return Buffer.from(i).toString("base64")};function Fw(i){var e=this,t=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,d=new Array(65535),g=new Array(65535),y=new Array(64),m=new Array(64),b=[],w=0,x=7,_=new Array(64),k=new Array(64),S=new Array(64),R=new Array(256),T=new Array(2048),N,C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],M=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],j=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],J=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Z=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ee(A){for(var z=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],te=0;te<64;te++){var X=r((z[te]*A+50)/100);X<1?X=1:X>255&&(X=255),n[C[te]]=X}for(var oe=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ae=0;ae<64;ae++){var be=r((oe[ae]*A+50)/100);be<1?be=1:be>255&&(be=255),s[C[ae]]=be}for(var _e=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Pe=0,Ae=0;Ae<8;Ae++)for(var q=0;q<8;q++)o[Pe]=1/(n[C[Pe]]*_e[Ae]*_e[q]*8),a[Pe]=1/(s[C[Pe]]*_e[Ae]*_e[q]*8),Pe++}function W(A,z){for(var te=0,X=0,oe=new Array,ae=1;ae<=16;ae++){for(var be=1;be<=A[ae];be++)oe[z[X]]=[],oe[z[X]][0]=te,oe[z[X]][1]=ae,X++,te++;te*=2}return oe}function Se(){l=W(M,L),c=W(J,F),u=W(G,j),f=W(V,Z)}function de(){for(var A=1,z=2,te=1;te<=15;te++){for(var X=A;X<z;X++)g[32767+X]=te,d[32767+X]=[],d[32767+X][1]=te,d[32767+X][0]=X;for(var oe=-(z-1);oe<=-A;oe++)g[32767+oe]=te,d[32767+oe]=[],d[32767+oe][1]=te,d[32767+oe][0]=z-1+oe;A<<=1,z<<=1}}function le(){for(var A=0;A<256;A++)T[A]=19595*A,T[A+256>>0]=38470*A,T[A+512>>0]=7471*A+32768,T[A+768>>0]=-11059*A,T[A+1024>>0]=-21709*A,T[A+1280>>0]=32768*A+8421375,T[A+1536>>0]=-27439*A,T[A+1792>>0]=-5329*A}function ce(A){for(var z=A[0],te=A[1]-1;te>=0;)z&1<<te&&(w|=1<<x),te--,x--,x<0&&(w==255?(I(255),I(0)):I(w),x=7,w=0)}function I(A){b.push(A)}function Q(A){I(A>>8&255),I(A&255)}function ke(A,z){var te,X,oe,ae,be,_e,Pe,Ae,q=0,K,ne=8,Ne=64;for(K=0;K<ne;++K){te=A[q],X=A[q+1],oe=A[q+2],ae=A[q+3],be=A[q+4],_e=A[q+5],Pe=A[q+6],Ae=A[q+7];var se=te+Ae,pe=te-Ae,Ee=X+Pe,ie=X-Pe,we=oe+_e,Ve=oe-_e,Ie=ae+be,dt=ae-be,Ct=se+Ie,ri=se-Ie,gi=Ee+we,yi=Ee-we;A[q]=Ct+gi,A[q+4]=Ct-gi;var qi=(yi+ri)*.707106781;A[q+2]=ri+qi,A[q+6]=ri-qi,Ct=dt+Ve,gi=Ve+ie,yi=ie+pe;var Fi=(Ct-yi)*.382683433,mr=.5411961*Ct+Fi,ji=1.306562965*yi+Fi,Ui=gi*.707106781,$i=pe+Ui,Vi=pe-Ui;A[q+5]=Vi+mr,A[q+3]=Vi-mr,A[q+1]=$i+ji,A[q+7]=$i-ji,q+=8}for(q=0,K=0;K<ne;++K){te=A[q],X=A[q+8],oe=A[q+16],ae=A[q+24],be=A[q+32],_e=A[q+40],Pe=A[q+48],Ae=A[q+56];var ns=te+Ae,rn=te-Ae,ss=X+Pe,os=X-Pe,as=oe+_e,ls=oe-_e,cs=ae+be,Sa=ae-be,Hi=ns+cs,ni=ns-cs,Gi=ss+as,gr=ss-as;A[q]=Hi+Gi,A[q+32]=Hi-Gi;var us=(gr+ni)*.707106781;A[q+16]=ni+us,A[q+4
Line truncated
|
||||
%s`,S,S,x,r);var R=x.type==="*"?bl:x.type==="?"?vl:"\\"+x.type;n=!0,r=r.slice(0,x.reStart)+R+"\\("+S}y(),s&&(r+="\\\\");var T=!1;switch(r.charAt(0)){case"[":case".":case"(":T=!0}for(var N=a.length-1;N>-1;N--){var C=a[N],M=r.slice(0,C.reStart),L=r.slice(C.reStart,C.reEnd-8),G=r.slice(C.reEnd-8,C.reEnd),j=r.slice(C.reEnd);G+=j;var J=M.split("(").length-1,F=j;for(m=0;m<J;m++)F=F.replace(/\)[+*?]?/,"");j=F;var V="";j===""&&e!==qs&&(V="$");var Z=M+L+j+V+G;r=Z}if(r!==""&&n&&(r="(?=.)"+r),T&&(r=d+r),e===qs)return[r,n];if(!n)return lx(i);var ee=t.nocase?"i":"";try{var W=new RegExp("^"+r+"$",ee)}catch{return new RegExp("$.")}return W._glob=i,W._src=r,W}Et.makeRe=function(i,e){return new Ue(i,e||{}).makeRe()};Ue.prototype.makeRe=ax;function ax(){if(this.regexp||this.regexp===!1)return this.regexp;var i=this.set;if(!i.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?bl:e.dot?Xw:ex,r=e.nocase?"i":"",n=i.map(function(s){return s.map(function(o){return o===zi?t:typeof o=="string"?cx(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}Et.match=function(i,e,t){t=t||{};var r=new Ue(e,t);return i=i.filter(function(n){return r.match(n)}),r.options.nonull&&!i.length&&i.push(e),i};Ue.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;fn.sep!=="/"&&(e=e.split(fn.sep).join("/")),e=e.split(Xp),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};Ue.prototype.matchOne=function(i,e,t){return e.indexOf(zi)!==-1?this._matchGlobstar(i,e,t,0,0):this._matchOne(i,e,t,0,0)};Ue.prototype._matchGlobstar=function(i,e,t,r,n){var s,o=-1;for(s=n;s<e.length;s++)if(e[s]===zi){o=s;break}var a=-1;for(s=e.length-1;s>=0;s--)if(e[s]===zi){a=s;break}var l=e.slice(n,o),c=e.slice(o+1,a),u=e.slice(a+1);if(l.length){var f=i.slice(r,r+l.length);if(!this._matchOne(f,l,t,0,0))return!1;r+=l.length}var d=0;if(u.length){if(u.length+r>i.length)return!1;var g=i.length-u.length;if(this._matchOne(i,u,t,g,0))d=u.length;else{if(i[i.length-1]!==""||r+u.length===i.length||(g--,!this._matchOne(i,u,t,g,0)))return!1;d=u.length+1}}if(!c.length){var y=!!d;for(s=r;s<i.length-d;s++){var m=String(i[s]);if(y=!0,m==="."||m===".."||!this.options.dot&&m.charAt(0)===".")return!1}return y}for(var b=[[[],0]],w=b[0],x=0,_=[0],k=0;k<c.length;k++){var S=c[k];S===zi?(_.push(x),w=[[],0],b.push(w)):(w[0].push(S),x++)}for(var R=b.length-1,T=i.length-d,N=0;N<b.length;N++)b[N][1]=T-(_[R--]+b[N][0].length);return!!this._matchGlobStarBodySections(i,b,r,0,t,0,!!d)};Ue.prototype._matchGlobStarBodySections=function(i,e,t,r,n,s,o){var a=e[r];if(!a){for(var l=t;l<i.length;l++){o=!0;var c=i[l];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1}return o}for(var u=a[0],f=a[1];t<=f;){var d=this._matchOne(i.slice(0,t+u.length),u,n,t,0);if(d&&s<this.maxGlobstarRecursion){var g=this._matchGlobStarBodySections(i,e,t+u.length,r+1,n,s+1,o);if(g!==!1)return g}var c=i[t];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1;t++}return null};Ue.prototype._matchOne=function(i,e,t,r,n){var s,o,a,l;for(s=r,o=n,a=i.length,l=e.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var c=e[o],u=i[s];if(this.debug(e,c,u),c===!1||c===zi)return!1;var f;if(typeof c=="string"?(f=u===c,this.debug("string match",c,u,f)):(f=u.match(c),this.debug("pattern match",c,u,f)),!f)return!1}if(s===a&&o===l)return!0;if(s===a)return t;if(o===l)return s===a-1&&i[s]==="";throw new Error("wtf?")};function lx(i){return i.replace(/\\(.)/g,"$1")}function cx(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var wl=O((H2,nd)=>{"use strict";var rd=require("fs"),_l;function ux(){try{return rd.statSync("/.dockerenv"),!0}catch{return!1}}function fx(){try{return rd.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}nd.exports=()=>(_l===void 0&&(_l=ux()||fx()),_l)});var ad=O((G2,xl)=>{"use strict";var hx=require("os"),px=require("fs"),sd=wl(),od=()=>{if(process.platform!=="linux")return!1;if(hx.release().toLowerCase().includes("microsoft"))return!sd();try{return px.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!sd():!1}catch{return!1}};process.env.__IS_WSL_TEST__?xl.exports=od:xl.exports=od()});var cd=O((W2,ld)=>{"use strict";ld.exports=(i,e,t)=>{let r=n=>Object.defineProperty(i,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let n=t();return r(n),n},set(n){r(n)}}),i}});var gd=O((Y2,md)=>{var dx=require("path"),mx=require("child_process"),{promises:Sl,constants:dd}=require("fs
Line truncated
|
||||
`)}displayWidth(e){return hm(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,n){var d;let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-n.displayWidth(e)),l=2,u=((d=this.helpWidth)!=null?d:80)-t-l-2,f;return u<this.minWidthToWrap||n.preformatted(r)?f=r:f=n.boxWrap(r,u).replace(/\n/g,`
|
||||
`+" ".repeat(t+l)),o+a+" ".repeat(l)+f.replace(/\n/g,`
|
||||
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(c+f<=t){l.push(u),c+=f;return}s.push(l.join(""));let d=u.trimStart();l=[d],c=this.displayWidth(d)}),s.push(l.join(""))}),s.join(`
|
||||
`)}};function hm(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}Yl.Help=Wl;Yl.stripColor=hm});var Ql=O(Zl=>{var{InvalidArgumentError:k1}=pn(),zl=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=C1(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new k1(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?pm(this.name().replace(/^no-/,"")):pm(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Jl=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let n=this.negativeOptions.get(r).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function pm(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function C1(i){let e,t,r=/^-[^-]$/,n=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
||||
- a short flag is a single dash and a single character
|
||||
- either use a single dash and a single character (for a short flag)
|
||||
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
|
||||
- too many short flags`):n.test(o)?new Error(`${a}
|
||||
- too many long flags`):new Error(`${a}
|
||||
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Zl.Option=zl;Zl.DualOptions=Jl});var mm=O(dm=>{function T1(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=i.length;n++){let s=1;i[n-1]===e[r-1]?s=0:s=1,t[n][r]=Math.min(t[n-1][r]+1,t[n][r-1]+1,t[n-1][r-1]+s),n>1&&r>1&&i[n-1]===e[r-2]&&i[n-2]===e[r-1]&&(t[n][r]=Math.min(t[n][r],t[n-2][r-2]+1))}return t[i.length][e.length]}function A1(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=T1(i,o),l=Math.max(i.length,o.length);(l-a)/l>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
||||
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
||||
(Did you mean ${r[0]}?)`:""}dm.suggestSimilar=A1});var bm=O(rc=>{var I1=require("node:events").EventEmitter,Xl=require("node:child_process"),li=require("node:path"),Gs=require("node:fs"),Oe=require("node:process"),{Argument:N1,humanReadableArgName:B1}=Hs(),{CommanderError:ec}=pn(),{Help:L1,stripColor:P1}=Kl(),{Option:gm,DualOptions:R1}=Ql(),{suggestSimilar:ym}=mm(),tc=class i extends I1{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Oe.stdout.write(t),writeErr:t=>Oe.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>Oe.stdout.isTTY?Oe.stdout.columns:void 0,getErrHelpWidth:()=>Oe.stderr.isTTY?Oe.stderr.columns:void 0,getOutHasColors:()=>{var t,r,n;return(n=ic())!=null?n:Oe.stdout.isTTY&&((r=(t=Oe.stdout).hasColors)==null?void 0:r.call(t))},getErrHasColors:()=>{var t,r,n;return(n=ic())!=null?n:Oe.stderr.isTTY&&((r=(t=Oe.stderr).hasColors)==null?void 0:r.call(t))},stripColor:t=>P1(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),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),n?this:l}createCommand(e){return new i(e)}createHelp(){return Object.assign(new L1,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
||||
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new N1(e,t)}argument(e,t,r,n){let s=this.createArgument(e,t);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e!=null?e:"help [command]";let[,r,n]=e.match(/([^ ]+) *(.*)/),s=t!=null?t:"display help for command",o=this.createCommand(r);return o.helpOption(!1),n&&o.arguments(n),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){var t;return((t=this._addImplicitHelpCommand)!=null?t:this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
||||
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new ec(e,t,r)),Oe.exit(e)}action(e){let t=r=>{let n=this.registeredArguments.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new gm(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
|
||||
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(r);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(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof gm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var n,s;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(n=Oe.versions)!=null&&n.electron&&(t.from="electron");let o=(s=Oe.execArgv)!=null?s:[];(o.includes("-e")||o.includes("--eval")||o.includes("-p")||o.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Oe.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Oe.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
||||
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(Gs.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
|
||||
- if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
||||
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
||||
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let d=li.resolve(u,f);if(Gs.existsSync(d))return d;if(n.includes(li.extname(f)))return;let g=n.find(y=>Gs.existsSync(`${d}${y}`));if(g)return`${d}${g}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Gs.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=li.resolve(li.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=li.basename(this._scriptPath,li.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}r=n.includes(li.extname(o));let l;Oe.platform!=="win32"?r?(t.unshift(o),t=vm(Oe.execArgv).concat(t),l=Xl.spawn(Oe.argv[0],t,{stdio:"inherit"})):l=Xl.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=vm(Oe.execArgv).concat(t),l=Xl.spawn(Oe.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Oe.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;l.on("close",u=>{u=u!=null?u:1,c?c(new ec(u,"commander.executeSubCommandAsync","(close)")):Oe.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)Oe.exit(1);else{let f=new ec(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,r){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(r));else return n._parseCommand(t,r)}),s}_dispatchHelpCommand(e){var r,n,s,o;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[(o=(s=(r=this._getHelpOption())==null?void 0:r.long)!=null?s:(n=this._getHelpOption())==null?void 0:n.short)!=null?o:"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,n,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:
Line truncated
|
||||
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
||||
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
||||
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Oe.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Oe.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new R1(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},n=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=ym(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=ym(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
||||
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=(n=this.parent)==null?void 0:n._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>B1(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=li.basename(e,li.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);return r.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,s;return t?(r=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:n,helpWidth:s}}outputHelp(e){var o;let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),(o=this._getHelpOption())!=null&&o.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){var r;return typeof e=="boolean"?(e?this._helpOption=(r=this._helpOption)!=null?r:void 0:this._helpOption=null,this):(e=e!=null?e:"-h, --help",t=t!=null?t:"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){var r;this.outputHelp(e);let t=Number((r=Oe.exitCode)!=null?r:0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
||||
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
||||
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function vm(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}function ic(){if(Oe.env.NO_COLOR||Oe.env.FORCE_COLOR==="0"||Oe.env.FORCE_COLOR==="false")return!1;if(Oe.env.FORCE_COLOR||Oe.env.CLICOLOR_FORCE!==void 0)return!0}rc.Command=tc;rc.useColor=ic});var Sm=O(Bt=>{var{Argument:_m}=Hs(),{Command:nc}=bm(),{CommanderError:M1,InvalidArgumentError:wm}=pn(),{Help:D1}=Kl(),{Option:xm}=Ql();Bt.program=new nc;Bt.createCommand=i=>new nc(i);Bt.createOption=(i,e)=>new xm(i,e);Bt.createArgument=(i,e)=>new _m(i,e);Bt.Command=nc;Bt.Option=xm;Bt.Argument=_m;Bt.Help=D1;Bt.CommanderError=M1;Bt.InvalidArgumentError=wm;Bt.InvalidOptionArgumentError=wm});var Am=O((Cm,Tm)=>{Cm=Tm.exports=Ir;function Ir(i,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var t=e;e={},e.total=t}else{if(e=e||{},typeof i!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=i,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}Ir.prototype.tick=function(i,e){if(i!==0&&(i=i||1),typeof i=="object"&&(e=i,i=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=i,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};Ir.prototype.render=function(i,e){if(e=e!==void 0?e:!1,i&&(this.tokens=i),!!this.stream.isTTY){var t=Date.now(),r=t-this.lastRender;if(!(!e&&r<this.renderThrottle)){this.lastRender=t;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),o,a,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),d=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),g=Math.max(0,this.stream.columns-d.replace(":bar","").length);g&&process.platform==="win32"&&(g=g-1);var y=Math.min(this.width,g);if(l=Math.round(y*n),a=Array(Math.max(0,l+1)).join(this.chars.complete),o=Array(Math.max(0,y-l+1)).join(this.chars.incomplete),l>0&&(a=a.slice(0,-1)+this.chars.head),d=d.replace(":bar",a+o),this.tokens)for(var m in this.tokens)d=d.replace(":"+m,this.tokens[m]);this.lastDraw!==d&&(this.stream.cursorTo(0),this.stream.write(d),this.stream.clearLine(1),this.lastDraw=d)}}};Ir.prototype.update=function(i,e){var t=Math.floor(i*this.total),r=t-this.curr;this.tick(r,e)};Ir.prototype.interrupt=function(i){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(i),this.stream.write(`
|
||||
`),this.stream.write(this.lastDraw)};Ir.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
|
||||
`)}});var Nm=O((BN,Im)=>{Im.exports=Am()});var Rm=O(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});var Bm=require("buffer"),Zi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};ci.ERRORS=Zi;function q1(i){if(!Bm.Buffer.isEncoding(i))throw new Error(Zi.INVALID_ENCODING)}ci.checkEncoding=q1;function Lm(i){return typeof i=="number"&&isFinite(i)&&$1(i)}ci.isFiniteInteger=Lm;function Pm(i,e){if(typeof i=="number"){if(!Lm(i)||i<0)throw new Error(e?Zi.INVALID_OFFSET:Zi.INVALID_LENGTH)}else throw new Error(e?Zi.INVALID_OFFSET_NON_NUMBER:Zi.INVALID_LENGTH_NON_NUMBER)}function F1(i){Pm(i,!1)}ci.checkLengthValue=F1;function j1(i){Pm(i,!0)}ci.checkOffsetValue=j1;function U1(i,e){if(i<0||i>e.length)throw new Error(Zi.INVALID_TARGET_OFFSET)}ci.checkTargetOffset=U1;function $1(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}function V1(i){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof Bm.Buffer.prototype[i]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}ci.bigIntAndBufferInt64Check=V1});var Dm=O(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var he=Rm(),Mm=4096,H1="utf8",sc=class i{constructor(e){if(this.length=0,this._encoding=H1,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(he.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(he.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(he.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(he.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Mm);else{if(typeof e!="undefined")throw new Error(he.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Mm)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return he.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return he.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return he.bigIntAndBufferInt64Check(
Line truncated
|
||||
`).join(`\r
|
||||
`)),s.removeListener("error",c0),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(En,this)})),a(u,n)}};f0.exports=Kc;function eO(i,e){for(let t of Object.keys(e))i.on(t,e[t]);return function(){for(let r of Object.keys(e))i.removeListener(r,e[r])}}function En(i){i._state=u0,i.emit("close")}function c0(){this.destroy()}function On(i,e,t,r){t=t||go.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...r},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${e} ${go.STATUS_CODES[e]}\r
|
||||
`+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r
|
||||
`)+`\r
|
||||
\r
|
||||
`+t)}function nr(i,e,t,r,n){if(i.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,nr),i.emit("wsClientError",s,t,e)}else On(t,r,n)}});var xe=O(it=>{"use strict";var Qc=Symbol.for("yaml.alias"),m0=Symbol.for("yaml.document"),yo=Symbol.for("yaml.map"),g0=Symbol.for("yaml.pair"),Xc=Symbol.for("yaml.scalar"),vo=Symbol.for("yaml.seq"),di=Symbol.for("yaml.node.type"),iO=i=>!!i&&typeof i=="object"&&i[di]===Qc,rO=i=>!!i&&typeof i=="object"&&i[di]===m0,nO=i=>!!i&&typeof i=="object"&&i[di]===yo,sO=i=>!!i&&typeof i=="object"&&i[di]===g0,y0=i=>!!i&&typeof i=="object"&&i[di]===Xc,oO=i=>!!i&&typeof i=="object"&&i[di]===vo;function v0(i){if(i&&typeof i=="object")switch(i[di]){case yo:case vo:return!0}return!1}function aO(i){if(i&&typeof i=="object")switch(i[di]){case Qc:case yo:case Xc:case vo:return!0}return!1}var lO=i=>(y0(i)||v0(i))&&!!i.anchor;it.ALIAS=Qc;it.DOC=m0;it.MAP=yo;it.NODE_TYPE=di;it.PAIR=g0;it.SCALAR=Xc;it.SEQ=vo;it.hasAnchor=lO;it.isAlias=iO;it.isCollection=v0;it.isDocument=rO;it.isMap=nO;it.isNode=aO;it.isPair=sO;it.isScalar=y0;it.isSeq=oO});var kn=O(eu=>{"use strict";var Ye=xe(),yt=Symbol("break visit"),b0=Symbol("skip children"),ti=Symbol("remove node");function bo(i,e){let t=_0(e);Ye.isDocument(i)?Ur(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):Ur(null,i,t,Object.freeze([]))}bo.BREAK=yt;bo.SKIP=b0;bo.REMOVE=ti;function Ur(i,e,t,r){let n=w0(i,e,t,r);if(Ye.isNode(n)||Ye.isPair(n))return x0(i,r,n),Ur(i,n,t,r);if(typeof n!="symbol"){if(Ye.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=Ur(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yt)return yt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ye.isPair(e)){r=Object.freeze(r.concat(e));let s=Ur("key",e.key,t,r);if(s===yt)return yt;s===ti&&(e.key=null);let o=Ur("value",e.value,t,r);if(o===yt)return yt;o===ti&&(e.value=null)}}return n}async function _o(i,e){let t=_0(e);Ye.isDocument(i)?await $r(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):await $r(null,i,t,Object.freeze([]))}_o.BREAK=yt;_o.SKIP=b0;_o.REMOVE=ti;async function $r(i,e,t,r){let n=await w0(i,e,t,r);if(Ye.isNode(n)||Ye.isPair(n))return x0(i,r,n),$r(i,n,t,r);if(typeof n!="symbol"){if(Ye.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=await $r(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yt)return yt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ye.isPair(e)){r=Object.freeze(r.concat(e));let s=await $r("key",e.key,t,r);if(s===yt)return yt;s===ti&&(e.key=null);let o=await $r("value",e.value,t,r);if(o===yt)return yt;o===ti&&(e.value=null)}}return n}function _0(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function w0(i,e,t,r){var n,s,o,a,l;if(typeof t=="function")return t(i,e,r);if(Ye.isMap(e))return(n=t.Map)==null?void 0:n.call(t,i,e,r);if(Ye.isSeq(e))return(s=t.Seq)==null?void 0:s.call(t,i,e,r);if(Ye.isPair(e))return(o=t.Pair)==null?void 0:o.call(t,i,e,r);if(Ye.isScalar(e))return(a=t.Scalar)==null?void 0:a.call(t,i,e,r);if(Ye.isAlias(e))return(l=t.Alias)==null?void 0:l.call(t,i,e,r)}function x0(i,e,t){let r=e[e.length-1];if(Ye.isCollection(r))r.items[i]=t;else if(Ye.isPair(r))i==="key"?r.key=t:r.value=t;else if(Ye.isDocument(r))r.contents=t;else{let n=Ye.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}eu.visit=bo;eu.visitAsync=_o});var tu=O(E0=>{"use strict";var S0=xe(),cO=kn(),uO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},fO=i=>i.replace(/[!,[\]{}]/g,e=>uO[e]),Cn=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:i.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},i.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:i.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},i.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);ret
Line truncated
|
||||
`)}};Cn.defaultYaml={explicit:!1,version:"1.2"};Cn.defaultTags={"!!":"tag:yaml.org,2002:"};E0.Directives=Cn});var wo=O(Tn=>{"use strict";var O0=xe(),hO=kn();function pO(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function k0(i){let e=new Set;return hO.visit(i,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function C0(i,e){for(let t=1;;++t){let r=`${i}${t}`;if(!e.has(r))return r}}function dO(i,e){let t=[],r=new Map,n=null;return{onAnchor:s=>{t.push(s),n!=null||(n=k0(i));let o=C0(e,n);return n.add(o),o},setAnchors:()=>{for(let s of t){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(O0.isScalar(o.node)||O0.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}Tn.anchorIsValid=pO;Tn.anchorNames=k0;Tn.createNodeAnchors=dO;Tn.findNewAnchor=C0});var iu=O(T0=>{"use strict";function An(i,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){let o=r[n],a=An(i,r,String(n),o);a===void 0?delete r[n]:a!==o&&(r[n]=a)}else if(r instanceof Map)for(let n of Array.from(r.keys())){let s=r.get(n),o=An(i,r,n,s);o===void 0?r.delete(n):o!==s&&r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let s=An(i,r,n,n);s===void 0?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(let[n,s]of Object.entries(r)){let o=An(i,r,n,s);o===void 0?delete r[n]:o!==s&&(r[n]=o)}return i.call(e,t,r)}T0.applyReviver=An});var ki=O(I0=>{"use strict";var mO=xe();function A0(i,e,t){if(Array.isArray(i))return i.map((r,n)=>A0(r,String(n),t));if(i&&typeof i.toJSON=="function"){if(!t||!mO.hasAnchor(i))return i.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(i,r),t.onCreate=s=>{r.res=s,delete t.onCreate};let n=i.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}I0.toJS=A0});var xo=O(B0=>{"use strict";var gO=iu(),N0=xe(),yO=ki(),ru=class{constructor(e){Object.defineProperty(this,N0.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!N0.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=yO.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?gO.applyReviver(s,{"":a},"",a):a}};B0.NodeBase=ru});var In=O(L0=>{"use strict";var vO=wo(),bO=kn(),Vr=xe(),_O=xo(),wO=ki(),nu=class extends _O.NodeBase{constructor(e){super(Vr.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;t!=null&&t.aliasResolveCache?r=t.aliasResolveCache:(r=[],bO.visit(e,{Node:(s,o)=>{(Vr.isAlias(o)||Vr.hasAnchor(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let n;for(let s of r){if(s===this)break;s.anchor===this.source&&(n=s)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=t,o=this.resolve(n,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(wO.toJS(o,null,t),a=r.get(o)),(a==null?void 0:a.res)===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=So(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){let n=`*${this.source}`;if(e){if(vO.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function So(i,e,t){if(Vr.isAlias(e)){let r=e.resolve(i),n=t&&r&&t.get(r);return n?n.count*n.aliasCount:0}else if(Vr.isCollection(e)){let r=0;for(let n of e.items){let s=So(i,n,t);s>r&&(r=s)}return r}else if(Vr.isPair(e)){let r=So(i,e.key,t),n=So(i,e.value,t);return Math.max(r,n)}return 1}L0.Alias=nu});var $e=O(su=>{"use strict";var xO=xe(),SO=xo(),EO=ki(),OO=i=>!i||typeof i!="function"&&typeof i!="object",Ci=class extends SO.NodeBase{constructor(e){super(xO.SCALAR),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:EO.toJS(this.value,e,t)}toString(){return String(this.value)}};Ci.BLOCK_FOLDED="BLOCK_FOLDED";Ci.BLOCK_LITERAL="BLOCK_LITERAL";Ci.PLAIN="PLAIN";Ci.QUOTE_DOUBLE="QUOTE_DOUBLE";Ci.QUOTE_SINGLE="QUOTE_SINGLE";su.Scalar=Ci;su.isScalarValue=OO});var Nn=O(R0=>{"use strict";var kO=In(),sr=xe(),P0=$e(),CO="tag:yaml.org,2002:";function TO(i,e,t){var r;if(e){let n=t.filter(o=>o.tag===e),s=(r=n.find(o=>!o.format))!=null?r:n[0];if(!
Line truncated
|
||||
`)?lu(t,e):t.includes(`
|
||||
`)?`
|
||||
`+lu(t,e):(i.endsWith(" ")?"":" ")+t;ko.indentComment=lu;ko.lineComment=LO;ko.stringifyComment=BO});var q0=O(Ln=>{"use strict";var PO="flow",cu="block",Co="quoted";function RO(i,e,t="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return i;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(i.length<=l)return i;let c=[],u={},f=n-e.length;typeof r=="number"&&(r>n-Math.max(2,s)?c.push(0):f=n-r);let d,g,y=!1,m=-1,b=-1,w=-1;t===cu&&(m=D0(i,m,e.length),m!==-1&&(f=m+l));for(let _;_=i[m+=1];){if(t===Co&&_==="\\"){switch(b=m,i[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}w=m}if(_===`
|
||||
`)t===cu&&(m=D0(i,m,e.length)),f=m+e.length+l,d=void 0;else{if(_===" "&&g&&g!==" "&&g!==`
|
||||
`&&g!==" "){let k=i[m+1];k&&k!==" "&&k!==`
|
||||
`&&k!==" "&&(d=m)}if(m>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Co){for(;g===" "||g===" ";)g=_,_=i[m+=1],y=!0;let k=m>w+1?m-2:b-1;if(u[k])return i;c.push(k),u[k]=!0,f=k+l,d=void 0}else y=!0}g=_}if(y&&a&&a(),c.length===0)return i;o&&o();let x=i.slice(0,c[0]);for(let _=0;_<c.length;++_){let k=c[_],S=c[_+1]||i.length;k===0?x=`
|
||||
${e}${i.slice(0,S)}`:(t===Co&&u[k]&&(x+=`${i[k]}\\`),x+=`
|
||||
${e}${i.slice(k+1,S)}`)}return x}function D0(i,e,t){let r=e,n=e+1,s=i[n];for(;s===" "||s===" ";)if(e<n+t)s=i[++e];else{do s=i[++e];while(s&&s!==`
|
||||
`);r=e,n=e+1,s=i[n]}return r}Ln.FOLD_BLOCK=cu;Ln.FOLD_FLOW=PO;Ln.FOLD_QUOTED=Co;Ln.foldFlowLines=RO});var Rn=O(F0=>{"use strict";var Gt=$e(),Ti=q0(),Ao=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Io=i=>/^(%|---|\.\.\.)/m.test(i);function MO(i,e,t){if(!e||e<0)return!1;let r=e-t,n=i.length;if(n<=r)return!1;for(let s=0,o=0;s<n;++s)if(i[s]===`
|
||||
`){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function Pn(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Io(i)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<n)l+=1;else{for(o+=t.slice(a,l)+`
|
||||
|
||||
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
||||
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:Ti.foldFlowLines(o,s,Ti.FOLD_QUOTED,Ao(e,!1))}function uu(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(i))return Pn(i,e);let t=e.indent||(Io(i)?" ":""),r="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${t}`)+"'";return e.implicitKey?r:Ti.foldFlowLines(r,t,Ti.FOLD_FLOW,Ao(e,!1))}function Hr(i,e){let{singleQuote:t}=e.options,r;if(t===!1)r=Pn;else{let n=i.includes('"'),s=i.includes("'");n&&!s?r=uu:s&&!n?r=Pn:r=t?uu:Pn}return r(i,e)}var fu;try{fu=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{fu=/\n+(?!\n|$)/g}function To({comment:i,type:e,value:t},r,n,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return Hr(t,r);let c=r.indent||(r.forceBlockIndent||Io(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===Gt.Scalar.BLOCK_FOLDED?!1:e===Gt.Scalar.BLOCK_LITERAL?!0:!MO(t,l,c.length);if(!t)return u?`|
|
||||
`:`>
|
||||
`;let f,d;for(d=t.length;d>0;--d){let S=t[d-1];if(S!==`
|
||||
`&&S!==" "&&S!==" ")break}let g=t.substring(d),y=g.indexOf(`
|
||||
`);y===-1?f="-":t===g||y!==g.length-1?(f="+",s&&s()):f="",g&&(t=t.slice(0,-g.length),g[g.length-1]===`
|
||||
`&&(g=g.slice(0,-1)),g=g.replace(fu,`$&${c}`));let m=!1,b,w=-1;for(b=0;b<t.length;++b){let S=t[b];if(S===" ")m=!0;else if(S===`
|
||||
`)w=b;else break}let x=t.substring(0,w<b?w+1:b);x&&(t=t.substring(x.length),x=x.replace(/\n+/g,`$&${c}`));let k=(m?c?"2":"1":"")+f;if(i&&(k+=" "+a(i.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let S=t.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),R=!1,T=Ao(r,!0);o!=="folded"&&e!==Gt.Scalar.BLOCK_FOLDED&&(T.onOverflow=()=>{R=!0});let N=Ti.foldFlowLines(`${x}${S}${g}`,c,Ti.FOLD_BLOCK,T);if(!R)return`>${k}
|
||||
${c}${N}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
|
||||
${c}${x}${t}${g}`}function DO(i,e,t,r){let{type:n,value:s}=i,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
|
||||
`)||u&&/[[\]{},]/.test(s))return Hr(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
|
||||
`)?Hr(s,e):To(i,e,t,r);if(!a&&!u&&n!==Gt.Scalar.PLAIN&&s.includes(`
|
||||
`))return To(i,e,t,r);if(Io(s)){if(l==="")return e.forceBlockIndent=!0,To(i,e,t,r);if(a&&l===c)return Hr(s,e)}let f=s.replace(/\n+/g,`$&
|
||||
${l}`);if(o){let d=m=>{var b;return m.default&&m.tag!=="tag:yaml.org,2002:str"&&((b=m.test)==null?void 0:b.test(f))},{compat:g,tags:y}=e.doc.schema;if(y.some(d)||g!=null&&g.some(d))return Hr(s,e)}return a?f:Ti.foldFlowLines(f,l,Ti.FOLD_FLOW,Ao(e,!1))}function qO(i,e,t,r){let{implicitKey:n,inFlow:s}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:a}=i;a!==Gt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Gt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Gt.Scalar.BLOCK_FOLDED:case Gt.Scalar.BLOCK_LITERAL:return n||s?Hr(o.value,e):To(o,e,t,r);case Gt.Scalar.QUOTE_DOUBLE:return Pn(o.value,e);case Gt.Scalar.QUOTE_SINGLE:return uu(o.value,e);case Gt.Scalar.PLAIN:return DO(o,e,t,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}F0.stringifyString=qO});var Mn=O(hu=>{"use strict";var FO=wo(),Ai=xe(),jO=Bn(),UO=Rn();function $O(i,e){let t=Object.assign({blockQuote:!0,commentString:jO.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function VO(i,e){var n,s,o,a;if(e.tag){let l=i.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let t,r;if(Ai.isScalar(e)){r=e.value;let l=i.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}t=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,t=i.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!t){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:r===null?"null":typeof r;throw new Error(`Tag not resolved for ${l} value`)}return t}function HO(i,e,{anchors:t,doc:r}){var a;if(!r.directives)return"";let n=[],s=(Ai.isScalar(i)||Ai.isCollection(i))&&i.anchor;s&&FO.anchorIsValid(s)&&(t.add(s),n.push(`&${s}`));let o=(a=i.tag)!=null?a:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function GO(i,e,t,r){var l,c;if(Ai.isPair(i))return i.toString(e,t,r);if(Ai.isAlias(i)){if(e.doc.directives)return i.toString(e);if((l=e.resolvedAliases)!=null&&l.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let n,s=Ai.isNode(i)?i:e.doc.createNode(i,{onTagObj:u=>n=u});n!=null||(n=VO(e.doc.schema.tags,s));let o=HO(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,t,r):Ai.isScalar(s)?UO.stringifyString(s,e,t,r):s.toString(e,t,r);return o?Ai.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
||||
${e.indent}${a}`:a}hu.createStringifyContext=$O;hu.stringify=GO});var V0=O($0=>{"use strict";var mi=xe(),j0=$e(),U0=Mn(),Dn=Bn();function WO({key:i,value:e},t,r,n){var T,N;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,d=mi.isNode(i)&&i.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(mi.isCollection(i)||!mi.isNode(i)&&typeof i=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let g=!f&&(!i||d&&e==null&&!t.inFlow||mi.isCollection(i)||(mi.isScalar(i)?i.type===j0.Scalar.BLOCK_FOLDED||i.type===j0.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!g&&(f||!s),indent:a+l});let y=!1,m=!1,b=U0.stringify(i,t,()=>y=!0,()=>m=!0);if(!g&&!t.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(t.inFlow){if(s||e==null)return y&&r&&r(),b===""?"?":g?`? ${b}`:b}else if(s&&!f||e==null&&g)return b=`? ${b}`,d&&!y?b+=Dn.lineComment(b,t.indent,c(d)):m&&n&&n(),b;y&&(d=null),g?(d&&(b+=Dn.lineComment(b,t.indent,c(d))),b=`? ${b}
|
||||
${a}:`):(b=`${b}:`,d&&(b+=Dn.lineComment(b,t.indent,c(d))));let w,x,_;mi.isNode(e)?(w=!!e.spaceBefore,x=e.commentBefore,_=e.comment):(w=!1,x=null,_=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!g&&!d&&mi.isScalar(e)&&(t.indentAtStart=b.length+1),m=!1,!u&&l.length>=2&&!t.inFlow&&!g&&mi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,S=U0.stringify(e,t,()=>k=!0,()=>m=!0),R=" ";if(d||w||x){if(R=w?`
|
||||
`:"",x){let C=c(x);R+=`
|
||||
${Dn.indentComment(C,t.indent)}`}S===""&&!t.inFlow?R===`
|
||||
`&&_&&(R=`
|
||||
|
||||
`):R+=`
|
||||
${t.indent}`}else if(!g&&mi.isCollection(e)){let C=S[0],M=S.indexOf(`
|
||||
`),L=M!==-1,G=(N=(T=t.inFlow)!=null?T:e.flow)!=null?N:e.items.length===0;if(L||!G){let j=!1;if(L&&(C==="&"||C==="!")){let J=S.indexOf(" ");C==="&"&&J!==-1&&J<M&&S[J+1]==="!"&&(J=S.indexOf(" ",J+1)),(J===-1||M<J)&&(j=!0)}j||(R=`
|
||||
${t.indent}`)}}else(S===""||S[0]===`
|
||||
`)&&(R="");return b+=R+S,t.inFlow?k&&r&&r():_&&!k?b+=Dn.lineComment(b,t.indent,c(_)):m&&n&&n(),b}$0.stringifyPair=WO});var du=O(pu=>{"use strict";var H0=require("process");function YO(i,...e){i==="debug"&&console.log(...e)}function KO(i,e){(i==="debug"||i==="warn")&&(typeof H0.emitWarning=="function"?H0.emitWarning(e):console.warn(e))}pu.debug=YO;pu.warn=KO});var Po=O(Lo=>{"use strict";var qn=xe(),G0=$e(),No="<<",Bo={identify:i=>i===No||typeof i=="symbol"&&i.description===No,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new G0.Scalar(Symbol(No)),{addToJSMap:W0}),stringify:()=>No},zO=(i,e)=>(Bo.identify(e)||qn.isScalar(e)&&(!e.type||e.type===G0.Scalar.PLAIN)&&Bo.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===Bo.tag&&t.default));function W0(i,e,t){if(t=i&&qn.isAlias(t)?t.resolve(i.doc):t,qn.isSeq(t))for(let r of t.items)mu(i,e,r);else if(Array.isArray(t))for(let r of t)mu(i,e,r);else mu(i,e,t)}function mu(i,e,t){let r=i&&qn.isAlias(t)?t.resolve(i.doc):t;if(!qn.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,i,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}Lo.addMergeToJSMap=W0;Lo.isMergeKey=zO;Lo.merge=Bo});var yu=O(z0=>{"use strict";var JO=du(),Y0=Po(),ZO=Mn(),K0=xe(),gu=ki();function QO(i,e,{key:t,value:r}){if(K0.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,r);else if(Y0.isMergeKey(i,t))Y0.addMergeToJSMap(i,e,r);else{let n=gu.toJS(t,"",i);if(e instanceof Map)e.set(n,gu.toJS(r,n,i));else if(e instanceof Set)e.add(n);else{let s=XO(t,n,i),o=gu.toJS(r,s,i);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function XO(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(K0.isNode(i)&&(t!=null&&t.doc)){let r=ZO.createStringifyContext(t.doc,{});r.anchors=new Set;for(let s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=i.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),JO.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}z0.addPairToJSMap=QO});var Ii=O(vu=>{"use strict";var J0=Nn(),ek=V0(),tk=yu(),Ro=xe();function ik(i,e,t){let r=J0.createNode(i,void 0,t),n=J0.createNode(e,void 0,t);return new Mo(r,n)}var Mo=class i{constructor(e,t=null){Object.defineProperty(this,Ro.NODE_TYPE,{value:Ro.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return Ro.isNode(t)&&(t=t.clone(e)),Ro.isNode(r)&&(r=r.clone(e)),new i(t,r)}toJSON(e,t){let r=t!=null&&t.mapAsMap?new Map:{};return tk.addPairToJSMap(t,r,this)}toString(e,t,r){return e!=null&&e.doc?ek.stringifyPair(this,e,t,r):JSON.stringify(this)}};vu.Pair=Mo;vu.createPair=ik});var bu=O(Q0=>{"use strict";var or=xe(),Z0=Mn(),Do=Bn();function rk(i,e,t){var s;return(((s=e.inFlow)!=null?s:i.flow)?sk:nk)(i,e,t)}function nk({comment:i,items:e},t,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),f=!1,d=[];for(let y=0;y<e.length;++y){let m=e[y],b=null;if(or.isNode(m))!f&&m.spaceBefore&&d.push(""),qo(t,d,m.commentBefore,f),m.comment&&(b=m.comment);else if(or.isPair(m)){let x=or.isNode(m.key)?m.key:null;x&&(!f&&x.spaceBefore&&d.push(""),qo(t,d,x.commentBefore,f))}f=!1;let w=Z0.stringify(m,u,()=>b=null,()=>f=!0);b&&(w+=Do.lineComment(w,s,c(b))),f&&b&&(f=!1),d.push(r+w)}let g;if(d.length===0)g=n.start+n.end;else{g=d[0];for(let y=1;y<d.length;++y){let m=d[y];g+=m?`
|
||||
${l}${m}`:`
|
||||
`}}return i?(g+=`
|
||||
`+Do.indentComment(c(i),l),a&&a()):f&&o&&o(),g}function sk({items:i},e,{flowChars:t,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let y=0;y<i.length;++y){let m=i[y],b=null;if(or.isNode(m))m.spaceBefore&&f.push(""),qo(e,f,m.commentBefore,!1),m.comment&&(b=m.comment);else if(or.isPair(m)){let x=or.isNode(m.key)?m.key:null;x&&(x.spaceBefore&&f.push(""),qo(e,f,x.commentBefore,!1),x.comment&&(c=!0));let _=or.isNode(m.value)?m.value:null;_?(_.comment&&(b=_.comment),_.commentBefore&&(c=!0)):m.value==null&&(x!=null&&x.comment)&&(b=x.comment)}b&&(c=!0);let w=Z0.stringify(m,l,()=>b=null);c||(c=f.length>u||w.includes(`
|
||||
`)),y<i.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((x,_)=>x+_.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),b&&(w+=Do.lineComment(w,r,a(b))),f.push(w),u=f.length}let{start:d,end:g}=t;if(f.length===0)return d+g;if(!c){let y=f.reduce((m,b)=>m+b.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=d;for(let m of f)y+=m?`
|
||||
${s}${n}${m}`:`
|
||||
`;return`${y}
|
||||
${n}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}function qo({indent:i,options:{commentString:e}},t,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=Do.indentComment(e(r),i);t.push(s.trimStart())}}Q0.stringifyCollection=rk});var Bi=O(wu=>{"use strict";var ok=bu(),ak=yu(),lk=Oo(),Ni=xe(),Fo=Ii(),ck=$e();function Fn(i,e){let t=Ni.isScalar(e)?e.value:e;for(let r of i)if(Ni.isPair(r)&&(r.key===e||r.key===t||Ni.isScalar(r.key)&&r.key.value===t))return r}var _u=class extends lk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ni.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(Fo.createPair(l,c,r))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let r;Ni.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Fo.Pair(e,e==null?void 0:e.value):r=new Fo.Pair(e.key,e.value);let n=Fn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);Ni.isScalar(n.value)&&ck.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let t=Fn(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var s;let r=Fn(this.items,e),n=r==null?void 0:r.value;return(s=!t&&Ni.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!Fn(this.items,e)}set(e,t){this.add(new Fo.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(n);for(let s of this.items)ak.addPairToJSMap(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Ni.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ok.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}};wu.YAMLMap=_u;wu.findPair=Fn});var Gr=O(ey=>{"use strict";var uk=xe(),X0=Bi(),fk={collection:"map",default:!0,nodeClass:X0.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return uk.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>X0.YAMLMap.from(i,e,t)};ey.map=fk});var Li=O(ty=>{"use strict";var hk=Nn(),pk=bu(),dk=Oo(),Uo=xe(),mk=$e(),gk=ki(),xu=class extends dk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Uo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=jo(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=jo(e);if(typeof r!="number")return;let n=this.items[r];return!t&&Uo.isScalar(n)?n.value:n}has(e){let t=jo(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=jo(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[r];Uo.isScalar(n)&&mk.isScalarValue(t)?n.value=t:this.items[r]=t}toJSON(e,t){let r=[];t!=null&&t.onCreate&&t.onCreate(r);let n=0;for(let s of this.items)r.push(gk.toJS(s,String(n++),t));return r}toString(e,t,r){return e?pk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof n=="function"){let l=t instanceof Set?a:String(o++);a=n.call(t,l,a)}s.items.push(hk.createNode(a,void 0,r))}}return s}};function jo(i){let e=Uo.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ty.YAMLSeq=xu});var Wr=O(ry=>{"use strict";var yk=xe(),iy=Li(),vk={collection:"seq",default:!0,nodeClass:iy.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(i,e){return yk.isSeq(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>iy.YAMLSeq.from(i,e,t)};ry.seq=vk});var jn=O(ny=>{"use strict";var bk=Rn(),_k={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,r){return e=Object.assign({actualString:!0},e),bk.stringifyString(i,e,t,r)}};ny.string=_k});var $o=O(ay=>{"use strict";var sy=$e(),oy={identify:i=>i==null,createNode:()=>new sy.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new sy.Scalar(null),stringify:({source:i},e)=>typeof i=="string"&&oy.test.test(i)?i:e.options.nullStr};ay.nullTag=oy});var Su=O(cy=>{"use strict";var wk=$e(),ly={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new wk.Scalar(i[0]==="t"||i[0]==="T"),stringify({sou
Line truncated
|
||||
`:" ")}return $k.stringifyString({comment:i,type:e,value:a},r,n,s)}};vy.binary=Vk});var zo=O(Ko=>{"use strict";var Yo=xe(),Bu=Ii(),Hk=$e(),Gk=Li();function by(i,e){var t;if(Yo.isSeq(i))for(let r=0;r<i.items.length;++r){let n=i.items[r];if(!Yo.isPair(n)){if(Yo.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new Bu.Pair(new Hk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
|
||||
${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(t=s.value)!=null?t:s.key;o.comment=o.comment?`${n.comment}
|
||||
${o.comment}`:n.comment}n=s}i.items[r]=Yo.isPair(n)?n:new Bu.Pair(n)}}else e("Expected a sequence for this tag");return i}function _y(i,e,t){let{replacer:r}=t,n=new Gk.YAMLSeq(i);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(Bu.createPair(a,l,t))}return n}var Wk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:by,createNode:_y};Ko.createPairs=_y;Ko.pairs=Wk;Ko.resolvePairs=by});var Ru=O(Pu=>{"use strict";var wy=xe(),Lu=ki(),$n=Bi(),Yk=Li(),xy=zo(),ar=class i extends Yk.YAMLSeq{constructor(){super(),this.add=$n.YAMLMap.prototype.add.bind(this),this.delete=$n.YAMLMap.prototype.delete.bind(this),this.get=$n.YAMLMap.prototype.get.bind(this),this.has=$n.YAMLMap.prototype.has.bind(this),this.set=$n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let n of this.items){let s,o;if(wy.isPair(n)?(s=Lu.toJS(n.key,"",t),o=Lu.toJS(n.value,s,t)):s=Lu.toJS(n,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let n=xy.createPairs(e,t,r),s=new this;return s.items=n.items,s}};ar.tag="tag:yaml.org,2002:omap";var Kk={collection:"seq",identify:i=>i instanceof Map,nodeClass:ar,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=xy.resolvePairs(i,e),r=[];for(let{key:n}of t.items)wy.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new ar,t)},createNode:(i,e,t)=>ar.from(i,e,t)};Pu.YAMLOMap=ar;Pu.omap=Kk});var Cy=O(Mu=>{"use strict";var Sy=$e();function Ey({value:i,source:e},t){return e&&(i?Oy:ky).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var Oy={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Sy.Scalar(!0),stringify:Ey},ky={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Sy.Scalar(!1),stringify:Ey};Mu.falseTag=ky;Mu.trueTag=Oy});var Ty=O(Jo=>{"use strict";var zk=$e(),Du=Yr(),Jk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Du.stringifyNumber},Zk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Du.stringifyNumber(i)}},Qk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new zk.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let r=i.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Du.stringifyNumber};Jo.float=Qk;Jo.floatExp=Zk;Jo.floatNaN=Jk});var Iy=O(Hn=>{"use strict";var Ay=Yr(),Vn=i=>typeof i=="bigint"||Number.isInteger(i);function Zo(i,e,t,{intAsBigInt:r}){let n=i[0];if((n==="-"||n==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),r){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return n==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return n==="-"?-1*s:s}function qu(i,e,t){let{value:r}=i;if(Vn(r)){let n=r.toString(e);return r<0?"-"+t+n.substr(1):t+n}return Ay.stringifyNumber(i)}var Xk={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>Zo(i,2,2,t),stringify:i=>qu(i,2,"0b")},eC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>Zo(i,1,8,t),stringify:i=>qu(i,8,"0")},tC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>Zo(i,0,10,t),stringify:Ay.stringifyNumber},iC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>Zo(i,2,16,t),stringify:i=>qu(i,16,"0x")};Hn.int=tC;Hn.intBin=Xk;Hn.intHex=iC;Hn.intOct=eC});var ju=O(Fu=>{"use strict";var ea=xe(),Qo=Ii(),Xo=Bi(),lr=class i extends Xo.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;ea.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Qo.Pair(e.key,null):t=new Qo.Pair(e,null),Xo.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=Xo.findPair(this.items,e);return!t&&ea.isPair(r)?ea.isScalar(r.key)?r.ke
Line truncated
|
||||
`)?(t.push("..."),t.push(Wn.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Wn.indentComment(s(c),"")))}return t.join(`
|
||||
`)+`
|
||||
`}Yy.stringifyDocument=AC});var Yn=O(zy=>{"use strict";var IC=In(),Kr=Oo(),Mt=xe(),NC=Ii(),BC=ki(),LC=Ju(),PC=Ky(),Qu=wo(),RC=iu(),MC=Nn(),Xu=tu(),ef=class i{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Mt.NODE_TYPE,{value:Mt.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Xu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(i.prototype,{[Mt.NODE_TYPE]:{value:Mt.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Mt.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){zr(this.contents)&&this.contents.add(e)}addIn(e,t){zr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=Qu.anchorNames(this);e.anchor=!t||r.has(t)?Qu.findNewAnchor(t||"a",r):t}return new IC.Alias(e.anchor)}createNode(e,t,r){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let b=x=>typeof x=="number"||x instanceof String||x instanceof Number,w=t.filter(b).map(String);w.length>0&&(t=t.concat(w)),n=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:g}=Qu.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:g},m=MC.createNode(e,u,y);return a&&Mt.isCollection(m)&&(m.flow=!0),d(),m}createPair(e,t,r={}){let n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new NC.Pair(n,s)}delete(e){return zr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Kr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):zr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Mt.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Kr.isEmptyPath(e)?!t&&Mt.isScalar(this.contents)?this.contents.value:this.contents:Mt.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Mt.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Kr.isEmptyPath(e)?this.contents!==void 0:Mt.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Kr.collectionFromPath(this.schema,[e],t):zr(this.contents)&&this.contents.set(e,t)}setIn(e,t){Kr.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Kr.collectionFromPath(this.schema,Array.from(e),t):zr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Xu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Xu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new LC.Schema(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=BC.toJS(this.contents,t!=null?t:"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?RC.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return PC.stringifyDocument(this,e)}};function zr(i){if(Mt.isCollection(i))return!0;throw new Error("Expected a YAML collection as document contents")}zy.Document=ef});var Jn=O(zn=>{"use strict";var Kn=class extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}},tf=class extends Kn{constructor(e,t,r){super("Y
Line truncated
|
||||
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];(l==null?void 0:l.line)===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
|
||||
|
||||
${o}
|
||||
${c}
|
||||
`}};zn.YAMLError=Kn;zn.YAMLParseError=tf;zn.YAMLWarning=rf;zn.prettifyError=DC});var Zn=O(Jy=>{"use strict";function qC(i,{flow:e,indicator:t,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",g=!1,y=!1,m=null,b=null,w=null,x=null,_=null,k=null,S=null;for(let N of i)switch(y&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&s(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),m&&(c&&N.type!=="comment"&&N.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),N.type){case"space":!e&&(t!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&N.source.includes(" ")&&(m=N),u=!0;break;case"comment":{u||s(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=N.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=N.source:(!k||t!=="seq-item-ind")&&(l=!0):d+=N.source,c=!0,g=!0,(b||w)&&(x=N),u=!0;break;case"anchor":b&&s(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&s(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=N,S!=null||(S=N.offset),c=!1,u=!1,y=!0;break;case"tag":{w&&s(N,"MULTIPLE_TAGS","A node can have at most one tag"),w=N,S!=null||(S=N.offset),c=!1,u=!1,y=!0;break}case t:(b||w)&&s(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),k&&s(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${e!=null?e:"collection"}`),k=N,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){_&&s(N,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),_=N,c=!1,u=!1;break}default:s(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),c=!1,u=!1}let R=i[i.length-1],T=R?R.offset+R.source.length:n;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:k,spaceBefore:l,comment:f,hasNewline:g,anchor:b,tag:w,newlineAfterProp:x,end:T,start:S!=null?S:T}}Jy.resolveProps=qC});var sa=O(Zy=>{"use strict";function nf(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
||||
`))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(nf(e.key)||nf(e.value))return!0}return!1;default:return!0}}Zy.containsNewline=nf});var sf=O(Qy=>{"use strict";var FC=sa();function jC(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===i&&(r.source==="]"||r.source==="}")&&FC.containsNewline(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Qy.flowIndentCheck=jC});var of=O(ev=>{"use strict";var Xy=xe();function UC(i,e,t){let{uniqueKeys:r}=i.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||Xy.isScalar(s)&&Xy.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,t))}ev.mapIncludes=UC});var ov=O(sv=>{"use strict";var tv=Ii(),$C=Bi(),iv=Zn(),VC=sa(),rv=sf(),HC=of(),nv="All mapping items must start at the same column";function GC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:$C.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:g,key:y,sep:m,value:b}=d,w=iv.resolveProps(g,{indicator:"explicit-key-ind",next:y!=null?y:m==null?void 0:m[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),x=!w.found;if(x){if(y&&(y.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==r.indent&&n(l,"BAD_INDENT",nv)),!w.anchor&&!w.tag&&!m){c=w.end,w.comment&&(a.comment?a.comment+=`
|
||||
`+w.comment:a.comment=w.comment);continue}(w.newlineAfterProp||VC.containsNewline(y))&&n(y!=null?y:g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=w.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",nv);t.atKey=!0;let _=w.end,k=y?i(t,y,w,n):e(t,_,g,null,w,n);t.schema.compat&&rv.flowIndentCheck(r.indent,y,n),t.atKey=!1,HC.mapIncludes(t,a.items,k)&&n(_,"DUPLICATE_KEY","Map keys must be unique");let S=iv.resolveProps(m!=null?m:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:n,parentIndent:r.indent,startOnNewline:!y||y.type==="block-scalar"});if(l=S.end,S.found){x&&((b==null?void 0:b.type)==="block-map"&&!S.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&w.start<S.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let R=b?i(t,b,S,n):e(t,l,m,null,S,n);t.schema.compat&&rv.flowIndentCheck(r.indent,b,n),l=R.range[2];let T=new tv.Pair(k,R);t.options.keepSourceTokens&&(T.srcToken=d),a.items.push(T)}else{x&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
|
||||
`+S.comment:k.comment=S.comment);let R=new tv.Pair(k);t.options.keepSourceTokens&&(R.srcToken=d),a.items.push(R)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c!=null?c:l],a}sv.resolveBlockMap=GC});var lv=O(av=>{"use strict";var WC=Li(),YC=Zn(),KC=sf();function zC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:WC.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let g=YC.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||d)(d==null?void 0:d.type)==="block-seq"?n(g.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=g.end,g.comment&&(a.comment=g.comment);continue}let y=d?i(t,d,g,n):e(t,g.end,f,null,g,n);t.schema.compat&&KC.flowIndentCheck(r.indent,d,n),l=y.range[2],a.items.push(y)}return a.range=[r.offset,l,c!=null?c:l],a}av.resolveBlockSeq=zC});var Jr=O(cv=>{"use strict";function JC(i,e,t,r){let n="";if(i){let s=!1,o="";for(let a of i){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}cv.resolveEnd=JC});var pv=O(hv=>{"use strict";var ZC=xe(),QC=Ii(),uv=Bi(),XC=Li(),eT=Jr(),fv=Zn(),tT=sa(),iT=of(),af="Block collections are not allowed within flow collections",lf=i=>i&&(i.type==="block-map"||i.type==="block-seq");function rT({composeNode:i,composeEmptyNode:e},t,r,n,s){var b,w,x;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?uv.YAMLMap:XC.YAMLSeq,c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){let k=r.items[_],{start:S,key:R,sep:T,value:N}=k,C=fv.resolveProps(S,{flow:a,indicator:"explicit-key-ind",next:R!=null?R:T==null?void 0:T[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!T&&!N){_===0&&C.comma?n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):_<r.items.length-1&&n(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(c.comment?c.comment+=`
|
||||
`+C.comment:c.comment=C.comment),f=C.end;continue}!o&&t.options.strict&&tT.containsNewline(R)&&n(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)C.comma&&n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||n(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let M="";e:for(let L of S)switch(L.type){case"comma":case"space":break;case"comment":M=L.source.substring(1);break e;default:break e}if(M){let L=c.items[c.items.length-1];ZC.isPair(L)&&(L=(w=L.value)!=null?w:L.key),L.comment?L.comment+=`
|
||||
`+M:L.comment=M,C.comment=C.comment.substring(M.length+1)}}if(!o&&!T&&!C.found){let M=N?i(t,N,C,n):e(t,C.end,T,null,C,n);c.items.push(M),f=M.range[2],lf(N)&&n(M.range,"BLOCK_IN_FLOW",af)}else{t.atKey=!0;let M=C.end,L=R?i(t,R,C,n):e(t,M,S,null,C,n);lf(R)&&n(L.range,"BLOCK_IN_FLOW",af),t.atKey=!1;let G=fv.resolveProps(T!=null?T:[],{flow:a,indicator:"map-value-ind",next:N,offset:L.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(G.found){if(!o&&!C.found&&t.options.strict){if(T)for(let F of T){if(F===G.found)break;if(F.type==="newline"){n(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.start<G.found.offset-1024&&n(G.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&((x=N.source)==null?void 0:x[0])===":"?n(N,"MISSING_CHAR",`Missing space after : in ${a}`):n(G.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let j=N?i(t,N,G,n):G.found?e(t,G.end,T,null,G,n):null;j?lf(N)&&n(j.range,"BLOCK_IN_FLOW",af):G.comment&&(L.comment?L.comment+=`
|
||||
`+G.comment:L.comment=G.comment);let J=new QC.Pair(L,j);if(t.options.keepSourceTokens&&(J.srcToken=k),o){let F=c;iT.mapIncludes(t,F.items,L)&&n(M,"DUPLICATE_KEY","Map keys must be unique"),F.items.push(J)}else{let F=new uv.YAMLMap(t.schema);F.flow=!0,F.items.push(J);let V=(j!=null?j:L).range;F.range=[L.range[0],V[1],V[2]],c.items.push(F)}f=j?j.range[2]:G.end}}let d=o?"}":"]",[g,...y]=r.end,m=f;if((g==null?void 0:g.source)===d)m=g.offset+g.source.length;else{let _=a[0].toUpperCase()+a.substring(1),k=u?`${_} must end with a ${d}`:`${_} in block collection must be sufficiently indented and end with a ${d}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&y.unshift(g)}if(y.length>0){let _=eT.resolveEnd(y,m,t.options.strict,n);_.comment&&(c.comment?c.comment+=`
|
||||
`+_.comment:c.comment=_.comment),c.range=[r.offset,m,_.offset]}else c.range=[r.offset,m,m];return c}hv.resolveFlowCollection=rT});var mv=O(dv=>{"use strict";var nT=xe(),sT=$e(),oT=Bi(),aT=Li(),lT=ov(),cT=lv(),uT=pv();function cf(i,e,t,r,n,s){let o=t.type==="block-map"?lT.resolveBlockMap(i,e,t,r,s):t.type==="block-seq"?cT.resolveBlockSeq(i,e,t,r,s):uT.resolveFlowCollection(i,e,t,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function fT(i,e,t,r,n){var d,g,y;let s=r.tag,o=s?e.directives.tagName(s.source,m=>n(s,"TAG_RESOLVE_FAILED",m)):null;if(t.type==="block-seq"){let{anchor:m,newlineAfterProp:b}=r,w=m&&s?m.offset>s.offset?m:s:m!=null?m:s;w&&(!b||b.offset<w.offset)&&n(w,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===oT.YAMLMap.tagName&&a==="map"||o===aT.YAMLSeq.tagName&&a==="seq")return cf(i,e,t,n,o);let l=e.schema.tags.find(m=>m.tag===o&&m.collection===a);if(!l){let m=e.schema.knownTags[o];if((m==null?void 0:m.collection)===a)e.schema.tags.push(Object.assign({},m,{default:!1})),l=m;else return m?n(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${(d=m.collection)!=null?d:"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),cf(i,e,t,n,o)}let c=cf(i,e,t,n,o,l),u=(y=(g=l.resolve)==null?void 0:g.call(l,c,m=>n(s,"TAG_RESOLVE_FAILED",m),e.options))!=null?y:c,f=nT.isNode(u)?u:new sT.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}dv.composeCollection=fT});var ff=O(gv=>{"use strict";var uf=$e();function hT(i,e,t){let r=e.offset,n=pT(e,i.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?uf.Scalar.BLOCK_FOLDED:uf.Scalar.BLOCK_LITERAL,o=e.source?dT(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let b=o[m][1];if(b===""||b==="\r")a=m;else break}if(a===0){let m=n.chomp==="+"&&o.length>0?`
|
||||
`.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:m,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let m=0;m<a;++m){let[b,w]=o[m];if(w===""||w==="\r")n.indent===0&&b.length>l&&(l=b.length);else{b.length<l&&t(c+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=b.length),u=m,l===0&&!i.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=b.length+w.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",d="",g=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
|
||||
`;for(let m=u;m<a;++m){let[b,w]=o[m];c+=b.length+w.length+1;let x=w[w.length-1]==="\r";if(x&&(w=w.slice(0,-1)),w&&b.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(x?2:1),"BAD_INDENT",k),b=""}s===uf.Scalar.BLOCK_LITERAL?(f+=d+b.slice(l)+w,d=`
|
||||
`):b.length>l||w[0]===" "?(d===" "?d=`
|
||||
`:!g&&d===`
|
||||
`&&(d=`
|
||||
|
||||
`),f+=d+b.slice(l)+w,d=`
|
||||
`,g=!0):w===""?d===`
|
||||
`?f+=`
|
||||
`:d=`
|
||||
`:(f+=d+w,d=" ",g=!1)}switch(n.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
|
||||
`+o[m][0].slice(l);f[f.length-1]!==`
|
||||
`&&(f+=`
|
||||
`);break;default:f+=`
|
||||
`}let y=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,y,y]}}function pT({offset:i,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],o=0,a="",l=-1;for(let d=1;d<n.length;++d){let g=n[d];if(!a&&(g==="-"||g==="+"))a=g;else{let y=Number(g);!o&&y?o=y:l===-1&&(l=i+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let d=1;d<e.length;++d){let g=e[d];switch(g.type){case"space":c=!0;case"newline":f+=g.source.length;break;case"comment":t&&!c&&r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=g.source.length,u=g.source.substring(1);break;case"error":r(g,"UNEXPECTED_TOKEN",g.message),f+=g.source.length;break;default:{let y=`Unexpected token in block scalar header: ${g.type}`;r(g,"UNEXPECTED_TOKEN",y);let m=g.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function dT(i){let e=i.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r!=null&&r[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}gv.resolveBlockScalar=hT});var pf=O(vv=>{"use strict";var hf=$e(),mT=Jr();function gT(i,e,t){let{offset:r,type:n,source:s,end:o}=i,a,l,c=(d,g,y)=>t(r+d,g,y);switch(n){case"scalar":a=hf.Scalar.PLAIN,l=yT(s,c);break;case"single-quoted-scalar":a=hf.Scalar.QUOTE_SINGLE,l=vT(s,c);break;case"double-quoted-scalar":a=hf.Scalar.QUOTE_DOUBLE,l=bT(s,c);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=mT.resolveEnd(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function yT(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),yv(i)}function vT(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),yv(i.slice(1,-1)).replace(/''/g,"'")}function yv(i){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(i);if(!r)return i;let n=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(i);)r[1]===""?s===`
|
||||
`?n+=s:s=`
|
||||
`:(n+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(i),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function bT(i,e){let t="";for(let r=1;r<i.length-1;++r){let n=i[r];if(!(n==="\r"&&i[r+1]===`
|
||||
`))if(n===`
|
||||
`){let{fold:s,offset:o}=_T(i,r);t+=s,r=o}else if(n==="\\"){let s=i[++r],o=wT[s];if(o)t+=o;else if(s===`
|
||||
`)for(s=i[r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="\r"&&i[r+1]===`
|
||||
`)for(s=i[++r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=xT(i,r+1,a,e),r+=a}else{let a=i.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(n===" "||n===" "){let s=r,o=i[r+1];for(;o===" "||o===" ";)o=i[++r+1];o!==`
|
||||
`&&!(o==="\r"&&i[r+2]===`
|
||||
`)&&(t+=r>s?i.slice(s,r+1):n)}else t+=n}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function _T(i,e){let t="",r=i[e+1];for(;(r===" "||r===" "||r===`
|
||||
`||r==="\r")&&!(r==="\r"&&i[e+2]!==`
|
||||
`);)r===`
|
||||
`&&(t+=`
|
||||
`),e+=1,r=i[e+1];return t||(t=" "),{fold:t,offset:e}}var wT={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xT(i,e,t,r){let n=i.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=i.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}vv.resolveFlowScalar=gT});var wv=O(_v=>{"use strict";var cr=xe(),bv=$e(),ST=ff(),ET=pf();function OT(i,e,t,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?ST.resolveBlockScalar(i,e,r):ET.resolveFlowScalar(e,i.options.strict,r),l=t?i.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null,c;i.options.stringKeys&&i.atKey?c=i.schema[cr.SCALAR]:l?c=kT(i.schema,n,l,t,r):e.type==="scalar"?c=CT(i,n,e,r):c=i.schema[cr.SCALAR];let u;try{let f=c.resolve(n,d=>r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),i.options);u=cr.isScalar(f)?f:new bv.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),u=new bv.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function kT(i,e,t,r,n){var a;if(t==="!")return i[cr.SCALAR];let s=[];for(let l of i.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[cr.SCALAR])}function CT({atKey:i,directives:e,schema:t},r,n,s){var a;let o=t.tags.find(l=>{var c;return(l.default===!0||i&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||t[cr.SCALAR];if(t.compat){let l=(a=t.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:t[cr.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}_v.composeScalar=OT});var Sv=O(xv=>{"use strict";function TT(i,e,t){if(e){t!=null||(t=e.length);for(let r=t-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":i-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)i+=n.source.length,n=e[++r];break}}return i}xv.emptyScalarPosition=TT});var kv=O(mf=>{"use strict";var AT=In(),IT=xe(),NT=mv(),Ev=wv(),BT=Jr(),LT=Sv(),PT={composeNode:Ov,composeEmptyNode:df};function Ov(i,e,t,r){let n=i.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=RT(i,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Ev.composeScalar(i,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=NT.composeCollection(PT,i,e,t,r),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c!=null||(c=df(i,e.offset,void 0,null,t,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&i.options.stringKeys&&(!IT.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),i.options.keepSourceTokens&&u&&(c.srcToken=e),c}function df(i,e,t,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:LT.emptyScalarPosition(e,t,r),indent:-1,source:""},f=Ev.composeScalar(i,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function RT({options:i},{offset:e,source:t,end:r},n){let s=new AT.Alias(t.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=BT.resolveEnd(r,o,i.strict,n);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}mf.composeEmptyNode=df;mf.composeNode=Ov});var Av=O(Tv=>{"use strict";var MT=Yn(),Cv=kv(),DT=Jr(),qT=Zn();function FT(i,e,{offset:t,start:r,value:n,end:s},o){let a=Object.assign({_directives:e},i),l=new MT.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=qT.resolveProps(r,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?Cv.composeNode(c,n,u,o):Cv.composeEmptyNode(c,u.end,r,null,u,o);let f=l.con
Line truncated
|
||||
|
||||
`:`
|
||||
`)+(o.substring(1)||" "),t=!0,r=!1;break;case"%":((n=i[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var gf=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,s)=>{let o=Xn(t);s?this.warnings.push(new Qn.YAMLWarning(o,r,n)):this.errors.push(new Qn.YAMLParseError(o,r,n))},this.directives=new UT.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=Nv(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
||||
${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(Iv.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Iv.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
|
||||
${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
|
||||
${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Nv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(jT.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=Xn(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=VT.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=HT.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
||||
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new $T.Document(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};Bv.Composer=gf});var Rv=O(oa=>{"use strict";var GT=ff(),WT=pf(),YT=Jn(),Lv=Rn();function KT(i,e=!0,t){if(i){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(a,s,o);else throw new YT.YAMLParseError([a,a+1],s,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return WT.resolveFlowScalar(i,e,r);case"block-scalar":return GT.resolveBlockScalar({options:{strict:e}},i,r)}}return null}function zT(i,e){var c;let{implicitKey:t=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=Lv.stringifyString({type:o,value:i},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
|
||||
`}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
|
||||
`),f=a.substring(0,u),d=a.substring(u+1)+`
|
||||
`,g=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return Pv(g,l)||g.push({type:"newline",offset:-1,indent:r,source:`
|
||||
`}),{type:"block-scalar",offset:s,indent:r,props:g,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function JT(i,e,t={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=t,a="indent"in i?i.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=i.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Lv.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":ZT(i,l);break;case'"':vf(i,l,"double-quoted-scalar");break;case"'":vf(i,l,"single-quoted-scalar");break;default:vf(i,l,"scalar")}}function ZT(i,e){let t=e.indexOf(`
|
||||
`),r=e.substring(0,t),n=e.substring(t+1)+`
|
||||
`;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,i.source=n}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];Pv(a,"end"in i?i.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
||||
`});for(let l of Object.keys(i))l!=="type"&&l!=="offset"&&delete i[l];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:n})}}function Pv(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function vf(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let r=i.props.slice(1),n=e.length;i.props[0].type==="block-scalar-header"&&(n-=i.props[0].source.length);for(let s of r)s.offset+=n;delete i.props,Object.assign(i,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
||||
`};delete i.items,Object.assign(i,{type:t,source:e,end:[n]});break}default:{let r="indent"in i?i.indent:-1,n="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:r,source:e,end:n})}}}oa.createScalarToken=zT;oa.resolveAsScalar=KT;oa.setScalarValue=JT});var Dv=O(Mv=>{"use strict";var QT=i=>"type"in i?la(i):aa(i);function la(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=la(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=aa(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=aa(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=aa(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function aa({start:i,key:e,sep:t,value:r}){let n="";for(let s of i)n+=s.source;if(e&&(n+=la(e)),t)for(let s of t)n+=s.source;return r&&(n+=la(r)),n}Mv.stringify=QT});var Uv=O(jv=>{"use strict";var bf=Symbol("break visit"),XT=Symbol("skip children"),qv=Symbol("remove item");function ur(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),Fv(Object.freeze([]),i,e)}ur.BREAK=bf;ur.SKIP=XT;ur.REMOVE=qv;ur.itemAtPath=(i,e)=>{let t=i;for(let[r,n]of e){let s=t==null?void 0:t[r];if(s&&"items"in s)t=s.items[n];else return}return t};ur.parentCollection=(i,e)=>{let t=ur.itemAtPath(i,e.slice(0,-1)),r=e[e.length-1][0],n=t==null?void 0:t[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function Fv(i,e,t){let r=t(e,i);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Fv(Object.freeze(i.concat([[n,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===bf)return bf;a===qv&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&n==="key"&&(r=r(e,i))}}return typeof r=="function"?r(e,i):r}jv.visit=ur});var ca=O(vt=>{"use strict";var _f=Rv(),eA=Dv(),tA=Uv(),wf="\uFEFF",xf="",Sf="",Ef="",iA=i=>!!i&&"items"in i,rA=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function nA(i){switch(i){case wf:return"<BOM>";case xf:return"<DOC>";case Sf:return"<FLOW_END>";case Ef:return"<SCALAR>";default:return JSON.stringify(i)}}function sA(i){switch(i){case wf:return"byte-order-mark";case xf:return"doc-mode";case Sf:return"flow-error-end";case Ef:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
||||
`:case`\r
|
||||
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}vt.createScalarToken=_f.createScalarToken;vt.resolveAsScalar=_f.resolveAsScalar;vt.setScalarValue=_f.setScalarValue;vt.stringify=eA.stringify;vt.visit=tA.visit;vt.BOM=wf;vt.DOCUMENT=xf;vt.FLOW_END=Sf;vt.SCALAR=Ef;vt.isCollection=iA;vt.isScalar=rA;vt.prettyToken=nA;vt.tokenType=sA});var Cf=O(Vv=>{"use strict";var es=ca();function Wt(i){switch(i){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}var $v=new Set("0123456789ABCDEFabcdef"),oA=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ua=new Set(",[]{}"),aA=new Set(` ,[]{}
|
||||
\r `),Of=i=>!i||aA.has(i),kf=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=(n=this.next)!=null?n:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
||||
`?!0:t==="\r"?this.buffer[e+1]===`
|
||||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
|
||||
`||!n&&!this.atEnd)return e+r+1}return t===`
|
||||
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Wt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===es.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield es.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Wt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Wt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Wt(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Of),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&Wt(n[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield es.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Of),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Wt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
|
||||
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=r.indexOf(`
|
||||
`,s)}n!==-1&&(t=n-(r[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Wt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
|
||||
`:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
||||
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
||||
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
||||
`;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
|
||||
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield es.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(Wt(s)||e&&ua.has(s))break;t=r}else if(Wt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===`
|
||||
`?(r+=1,n=`
|
||||
`,s=this.buffer[r+1]):t=r),s==="#"||e&&ua.has(s))break;if(n===`
|
||||
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&ua.has(n))break;t=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield es.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Of))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(Wt(t)||e&&ua.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Wt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(oA.has(t))t=this.buffer[++e];else if(t==="%"&&$v.has(this.buffer[e+1])&&$v.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||||
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Vv.Lexer=kf});var Af=O(Hv=>{"use strict";var Tf=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};Hv.LineCounter=Tf});var Nf=O(zv=>{"use strict";var lA=require("process"),Gv=ca(),cA=Cf();function Pi(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function Wv(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Kv(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fa(i){var e;switch(i.type){case"document":return i.start;case"block-map":{let t=i.items[i.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function Zr(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function Yv(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!Pi(e.start,"explicit-key-ind")&&!Pi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Kv(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var If=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new cA.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,lA.env.LOG_TOKENS&&console.log("|",Gv.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Gv.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Yv(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];n.value?r.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];!n||n.value?r.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-m
Line truncated
|
||||
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
||||
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Pi(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Kv(t.key)&&!Pi(t.sep,"newline")){let a=Zr(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(Pi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=Zr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Pi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||t.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Pi(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Pi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,se
Line truncated
|
||||
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
||||
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=fa(e),r=Zr(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=fa(e),r=Zr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};zv.Parser=If});var eb=O(is=>{"use strict";var Jv=yf(),uA=Yn(),ts=Jn(),fA=du(),hA=xe(),pA=Af(),Zv=Nf();function Qv(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new pA.LineCounter||null,prettyErrors:e}}function dA(i,e={}){let{lineCounter:t,prettyErrors:r}=Qv(e),n=new Zv.Parser(t==null?void 0:t.addNewLine),s=new Jv.Composer(e),o=Array.from(s.compose(n.parse(i)));if(r&&t)for(let a of o)a.errors.forEach(ts.prettifyError(i,t)),a.warnings.forEach(ts.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Xv(i,e={}){let{lineCounter:t,prettyErrors:r}=Qv(e),n=new Zv.Parser(t==null?void 0:t.addNewLine),s=new Jv.Composer(e),o=null;for(let a of s.compose(n.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ts.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(ts.prettifyError(i,t)),o.warnings.forEach(ts.prettifyError(i,t))),o}function mA(i,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=Xv(i,t);if(!n)return null;if(n.warnings.forEach(s=>fA.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},t))}function gA(i,e,t){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(i===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return hA.isDocument(i)&&!r?i.toString(t):new uA.Document(i,r,t).toString(t)}is.parse=mA;is.parseAllDocuments=dA;is.parseDocument=Xv;is.stringify=gA});var ib=O(Ce=>{"use strict";var yA=yf(),vA=Yn(),bA=Ju(),Bf=Jn(),_A=In(),Ri=xe(),wA=Ii(),xA=$e(),SA=Bi(),EA=Li(),OA=ca(),kA=Cf(),CA=Af(),TA=Nf(),ha=eb(),tb=kn();Ce.Composer=yA.Composer;Ce.Document=vA.Document;Ce.Schema=bA.Schema;Ce.YAMLError=Bf.YAMLError;Ce.YAMLParseError=Bf.YAMLParseError;Ce.YAMLWarning=Bf.YAMLWarning;Ce.Alias=_A.Alias;Ce.isAlias=Ri.isAlias;Ce.isCollection=Ri.isCollection;Ce.isDocument=Ri.isDocument;Ce.isMap=Ri.isMap;Ce.isNode=Ri.isNode;Ce.isPair=Ri.isPair;Ce.isScalar=Ri.isScalar;Ce.isSeq=Ri.isSeq;Ce.Pair=wA.Pair;Ce.Scalar=xA.Scalar;Ce.YAMLMap=SA.YAMLMap;Ce.YAMLSeq=EA.YAMLSeq;Ce.CST=OA;Ce.Lexer=kA.Lexer;Ce.LineCounter=CA.LineCounter;Ce.Parser=TA.Parser;Ce.parse=ha.parse;Ce.parseAllDocuments=ha.parseAllDocuments;Ce.parseDocument=ha.parseDocument;Ce.stringify=ha.stringify;Ce.visit=tb.visit;Ce.visitAsync=tb.visitAsync});var nb=O((PL,rb)=>{var Mi=require("constants"),AA=process.cwd,pa=null,IA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return pa||(pa=AA.call(process)),pa};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Lf=process.chdir,process.chdir=function(i){pa=null,Lf.call(process,i)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Lf));var Lf;rb.exports=NA;function NA(i){Mi.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(i),i.lutimes||t(i),i.chown=s(i.chown),i.fchown=s(i.fchown),i.lchown=s(i.lchown),i.chmod=r(i.chmod),i.fchmod=r(i.fchmod),i.lchmod=r(i.lchmod),i.chownSync=o(i.chownSync),i.fchownSync=o(i.fchownSync),i.lchownSync=o(i.lchownSync),i.chmodSync=n(i.chmodSync),i.fchmodSync=n(i.fchmodSy
Line truncated
|
||||
GFS4: `),console.error(i)});De[rt]||(ub=global[rt]||[],hb(De,ub),De.close=(function(i){function e(t,r){return i.call(De,t,function(n){n||fb(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,ga,{value:i}),e})(De.close),De.closeSync=(function(i){function e(t){i.apply(De,arguments),fb()}return Object.defineProperty(e,ga,{value:i}),e})(De.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fr(De[rt]),require("assert").equal(De[rt].length,0)}));var ub;global[rt]||hb(global,De[rt]);Mf.exports=Pf(DA(De));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!De.__patched&&(Mf.exports=Pf(De),De.__patched=!0);function Pf(i){RA(i),i.gracefulify=Pf,i.createReadStream=S,i.createWriteStream=R;var e=i.readFile;i.readFile=t;function t(C,M,L){return typeof M=="function"&&(L=M,M=null),G(C,M,L);function G(j,J,F,V){return e(j,J,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Qr([G,[j,J,F],Z,V||Date.now(),Date.now()]):typeof F=="function"&&F.apply(this,arguments)})}}var r=i.writeFile;i.writeFile=n;function n(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return r(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var s=i.appendFile;s&&(i.appendFile=o);function o(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return s(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var a=i.copyFile;a&&(i.copyFile=l);function l(C,M,L,G){return typeof L=="function"&&(G=L,L=0),j(C,M,L,G);function j(J,F,V,Z,ee){return a(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var c=i.readdir;i.readdir=f;var u=/^v[0-5]\./;function f(C,M,L){typeof M=="function"&&(L=M,M=null);var G=u.test(process.version)?function(F,V,Z,ee){return c(F,j(F,V,Z,ee))}:function(F,V,Z,ee){return c(F,V,j(F,V,Z,ee))};return G(C,M,L);function j(J,F,V,Z){return function(ee,W){ee&&(ee.code==="EMFILE"||ee.code==="ENFILE")?Qr([G,[J,F,V],ee,Z||Date.now(),Date.now()]):(W&&W.sort&&W.sort(),typeof V=="function"&&V.call(this,ee,W))}}}if(process.version.substr(0,4)==="v0.8"){var d=MA(i);w=d.ReadStream,_=d.WriteStream}var g=i.ReadStream;g&&(w.prototype=Object.create(g.prototype),w.prototype.open=x);var y=i.WriteStream;y&&(_.prototype=Object.create(y.prototype),_.prototype.open=k),Object.defineProperty(i,"ReadStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0}),Object.defineProperty(i,"WriteStream",{get:function(){return _},set:function(C){_=C},enumerable:!0,configurable:!0});var m=w;Object.defineProperty(i,"FileReadStream",{get:function(){return m},set:function(C){m=C},enumerable:!0,configurable:!0});var b=_;Object.defineProperty(i,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function w(C,M){return this instanceof w?(g.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function x(){var C=this;N(C.path,C.flags,C.mode,function(M,L){M?(C.autoClose&&C.destroy(),C.emit("error",M)):(C.fd=L,C.emit("open",L),C.read())})}function _(C,M){return this instanceof _?(y.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function k(){var C=this;N(C.path,C.flags,C.mode,function(M,L){M?(C.destroy(),C.emit("error",M)):(C.fd=L,C.emit("open",L))})}function S(C,M){return new i.ReadStream(C,M)}function R(C,M){return new i.WriteStream(C,M)}var T=i.open;i.open=N;function N(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return T(J,F,V,function(W,Se){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return i}function Qr(i){fr("ENQUEUE",i[0].name,i[1]),De[rt].push(i),Rf()}var ma;function fb(){for(var i=Date.now(),e=0;e<De[rt].length;++e)De[rt][e].length>2&&(De[rt][e][3]=i,De[rt][e][4]=i);Rf()}function Rf(){if(clearTimeout(ma),ma=void 0,De[rt].length!==0){var i=De[rt].shift(),e=i[0],t=i[1],r=i[2],n=i[3],s=i[4];if(n===void 0)fr("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){fr("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(fr("RETRY",e.name,t),e.apply(null,t.concat([n]))):De[rt].push(i)}ma===void 0&&(ma=setTimeout(Rf,0))}}});var mb=O((qL,db)=>{function Dt(i,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=thi
Line truncated
|
||||
`)&&!i.startsWith(`
|
||||
`)&&!i.match(/[^\r]\n/)}function qh(i){return!i.includes(`\r
|
||||
`)&&i.includes(`
|
||||
`)}function Fa(i,e){let t=[];for(let r of Array.from(e.segment(i))){let n=r.segment;t.length&&/\s/.test(t[t.length-1])&&/\s/.test(n)?t[t.length-1]+=n:t.push(n)}return t}function Ts(i,e){if(e)return Sr(i,e)[1];let t;for(t=i.length-1;t>=0&&i[t].match(/\s/);t--);return i.substring(t+1)}function Ki(i,e){if(e)return Sr(i,e)[0];let t=i.match(/^\s*/);return t?t[0]:""}function Sr(i,e){if(!e)return[Ki(i),Ts(i)];if(e.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let t=Fa(i,e),r=t[0],n=t[t.length-1],s=/\s/.test(r)?r:"",o=/\s/.test(n)?n:"";return[s,o]}var As="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",z_=new RegExp(`[${As}]+|\\s+|[^${As}]`,"ug"),ja=class extends je{equals(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let r;if(t.intlSegmenter){let o=t.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Fa(e,o)}else r=e.match(z_)||[];let n=[],s=null;return r.forEach(o=>{/\s/.test(o)?s==null?n.push(o):n.push(n.pop()+o):s!=null&&/\s/.test(s)?n[n.length-1]==s?n.push(n.pop()+o):n.push(s+o):n.push(o),s=o}),n}join(e){return e.map((t,r)=>r==0?t:t.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let r=null,n=null,s=null;return e.forEach(o=>{o.added?n=o:o.removed?s=o:((n||s)&&Fh(r,s,n,o,t.intlSegmenter),r=o,n=null,s=null)}),(n||s)&&Fh(r,s,n,null,t.intlSegmenter),e}},$a=new ja;function jh(i,e,t){return(t==null?void 0:t.ignoreWhitespace)!=null&&!t.ignoreWhitespace?Ha(i,e,t):$a.diff(i,e,t)}function Fh(i,e,t,r,n){if(e&&t){let[s,o]=Sr(e.value,n),[a,l]=Sr(t.value,n);if(i){let c=Ma(s,a);i.value=Cs(i.value,a,c),e.value=xr(e.value,c),t.value=xr(t.value,c)}if(r){let c=Da(o,l);r.value=ks(r.value,l,c),e.value=sn(e.value,c),t.value=sn(t.value,c)}}else if(t){if(i){let s=Ki(t.value,n);t.value=t.value.substring(s.length)}if(r){let s=Ki(r.value,n);r.value=r.value.substring(s.length)}}else if(i&&r){let s=Ki(r.value,n),[o,a]=Sr(e.value,n),l=Ma(s,o);e.value=xr(e.value,l);let c=Da(xr(s,l),a);e.value=sn(e.value,c),r.value=ks(r.value,s,c),i.value=Cs(i.value,s,s.slice(0,s.length-c.length))}else if(r){let s=Ki(r.value,n),o=Ts(e.value,n),a=qa(o,s);e.value=sn(e.value,a)}else if(i){let s=Ts(i.value,n),o=Ki(e.value,n),a=qa(s,o);e.value=xr(e.value,a)}}var Ua=class extends je{tokenize(e){let t=new RegExp(`(\\r?\\n)|[${As}]+|[^\\S\\n\\r]+|[^${As}]`,"ug");return e.match(t)||[]}},Va=new Ua;function Ha(i,e,t){return Va.diff(i,e,t)}function Uh(i,e){if(typeof i=="function")e.callback=i;else if(i)for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e}var Ga=class extends je{constructor(){super(...arguments),this.tokenize=Wa}equals(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
|
||||
`))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
|
||||
`))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
|
||||
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
||||
`)&&(t=t.slice(0,-1))),super.equals(e,t,r)}},Is=new Ga;function on(i,e,t){return Is.diff(i,e,t)}function $h(i,e,t){return t=Uh(t,{ignoreWhitespace:!0}),Is.diff(i,e,t)}function Wa(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,`
|
||||
`));let t=[],r=i.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let n=0;n<r.length;n++){let s=r[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t}function J_(i){return i=="."||i=="!"||i=="?"}var Ya=class extends je{tokenize(e){var t;let r=[],n=0;for(let s=0;s<e.length;s++){if(s==e.length-1){r.push(e.slice(n));break}if(J_(e[s])&&e[s+1].match(/\s/)){for(r.push(e.slice(n,s+1)),s=n=s+1;!((t=e[s+1])===null||t===void 0)&&t.match(/\s/);)s++;r.push(e.slice(n,s+1)),n=s+1}}return r}},Ka=new Ya;function Vh(i,e,t){return Ka.diff(i,e,t)}var za=class extends je{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},Ja=new za;function Hh(i,e,t){return Ja.diff(i,e,t)}var Za=class extends je{constructor(){super(...arguments),this.tokenize=Wa}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:r,stringifyReplacer:n=(s,o)=>typeof o=="undefined"?r:o}=t;return typeof e=="string"?e:JSON.stringify(an(e,null,null,n),null," ")}equals(e,t,r){return super.equals(e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)}},Qa=new Za;function Gh(i,e,t){return Qa.diff(i,e,t)}function an(i,e,t,r,n){e=e||[],t=t||[],r&&(i=r(n===void 0?"":n,i));let s;for(s=0;s<e.length;s+=1)if(e[s]===i)return t[s];let o;if(Object.prototype.toString.call(i)==="[object Array]"){for(e.push(i),o=new Array(i.length),t.push(o),s=0;s<i.length;s+=1)o[s]=an(i[s],e,t,r,String(s));return e.pop(),t.pop(),o}if(i&&i.toJSON&&(i=i.toJSON()),typeof i=="object"&&i!==null){e.push(i),o={},t.push(o);let a=[],l;for(l in i)Object.prototype.hasOwnProperty.call(i,l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=an(i[l],e,t,r,l);e.pop(),t.pop()}else o=i;return o}var Xa=class extends je{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},el=new Xa;function Wh(i,e,t){return el.diff(i,e,t)}function tl(i){return Array.isArray(i)?i.map(e=>tl(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,r)=>{var n;return t.startsWith("\\")||t.endsWith("\r")||!((n=e.lines[r+1])===null||n===void 0)&&n.startsWith("\\")?t:t+"\r"})}))})}function il(i){return Array.isArray(i)?i.map(e=>il(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(t=>t.endsWith("\r")?t.substring(0,t.length-1):t)}))})}function Yh(i){return Array.isArray(i)||(i=[i]),!i.some(e=>e.hunks.some(t=>t.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function Kh(i){return Array.isArray(i)||(i=[i]),i.some(e=>e.hunks.some(t=>t.lines.some(r=>r.endsWith("\r"))))&&i.every(e=>e.hunks.every(t=>t.lines.every((r,n)=>{var s;return r.startsWith("\\")||r.endsWith("\r")||((s=t.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})))}function ln(i){let e=i.split(/\n/),t=[],r=0;function n(){let a={};for(t.push(a);r<e.length;){let l=e[r];if(/^(---|\+\+\+|@@)\s/.test(l))break;let c=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(l);c&&(a.index=l.substring(c[0].length).trim()),r++}for(s(a),s(a),a.hunks=[];r<e.length;){let l=e[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(l))break;if(/^@@/.test(l))a.hunks.push(o());else{if(l)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(l));r++}}}function s(a){let l=/^(---|\+\+\+)\s+/.exec(e[r]);if(l){let c=l[1],u=e[r].substring(3).trim().split(" ",2),f=(u[1]||"").trim(),d=u[0].replace(/\\\\/g,"\\");d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),c==="---"?(a.oldFileName=d,a.oldHeader=f):(a.newFileName=d,a.newHeader=f),r++}}function o(){var a;let l=r,c=e[r++],u=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),f={oldStart:+u[1],oldLines:typeof u[2]=="undefined"?1:+u[2],newStart:+u[3],newLines:typeof u[4]=="undefined"?1:+u[4],lines:[]};f.oldLines===0&&(f.oldStart+=1),f.newLines===0&&(f.newStart+=1);let d=0,g=0;for(;r<e.length&&(g<f.oldLines||d<f.newLines||!((a=e[r])===null||a===void 0)&&a.startsWith("\\"));r++){let y=e[r].length==0&&r!=e.length-1?" ":e[r][0];if(y==="+"||y==="-"||y===" "||y==="\\")f.lines.push(e[r]),y==="+"?d++:y==="-"?g++:y===" "&&(d++,g++);else throw new Error(`Hunk at line ${l+1} contained invalid line ${e[r]}`)}if(!d&&f.newLines===1&&(f.newLines=0),!g&&f.oldLines===1&&(f.oldLines=0),d!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(l+1));if(g!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(l+1));return f}for(;r<e.length;)n();return t}function zh(i,e,t){let r=!0,n=!1,s=!1,o=1;return function a(){if(r&&!s){if(n?o++:r=!1,i+o<=t)return i+o;s=!0}if(!n)return s||(r=!0),e<=i-o?i-o++:(n=!0,a())}}function rl(i,e,t={}){let r;if(typeof e=="string"?r=ln(e):Array.isArray(e)?r=e:r=[e],r.length>1)throw new Error("applyPatch only works with a single input.");return Z_(i,r[0],t)}function Z_(i,e,t={}){(t.autoConvertLineEndings||t.autoConvertLineEndings==null)&&(Dh(i)&&Yh(e)?e=tl(e):qh(i)&&Kh(e)&&(e=il(e)));let r=i.split(`
|
||||
`),n=e.hunks,s=t.compareLine||((y,m,b,w)=>m===w),o=t.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return i;let l="",c=!1,u=!1;for(let y=0;y<n[n.length-1].lines.length;y++){let m=n[n.length-1].lines[y];m[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=m}if(c){if(u){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function f(y,m,b,w=0,x=!0,_=[],k=0){let S=0,R=!1;for(;w<y.length;w++){let T=y[w],N=T.length>0?T[0]:" ",C=T.length>0?T.substr(1):T;if(N==="-")if(s(m+1,r[m],N,C))m++,S=0;else return!b||r[m]==null?null:(_[k]=r[m],f(y,m+1,b-1,w,!1,_,k+1));if(N==="+"){if(!x)return null;_[k]=C,k++,S=0,R=!0}if(N===" ")if(S++,_[k]=r[m],s(m+1,r[m],N,C))k++,x=!0,R=!1,m++;else return R||!b?null:r[m]&&(f(y,m+1,b-1,w+1,!1,_,k+1)||f(y,m+1,b-1,w,!1,_,k+1))||f(y,m,b-1,w+1,!1,_,k)}return k-=S,m-=S,_.length=k,{patchedLines:_,oldLineLastI:m-1}}let d=[],g=0;for(let y=0;y<n.length;y++){let m=n[y],b,w=r.length-m.oldLines+o,x;for(let _=0;_<=o;_++){x=m.oldStart+g-1;let k=zh(x,a,w);for(;x!==void 0&&(b=f(m.lines,x,_),!b);x=k());if(b)break}if(!b)return!1;for(let _=a;_<x;_++)d.push(r[_]);for(let _=0;_<b.patchedLines.length;_++){let k=b.patchedLines[_];d.push(k)}a=b.oldLineLastI+1,g=x+1-m.oldStart}for(let y=a;y<r.length;y++)d.push(r[y]);return d.join(`
|
||||
`)}function Jh(i,e){let t=typeof i=="string"?ln(i):i,r=0;function n(){let s=t[r++];if(!s)return e.complete();e.loadFile(s,function(o,a){if(o)return e.complete(o);let l=rl(a,s,e);e.patched(s,l,function(c){if(c)return e.complete(c);n()})})}n()}function nl(i){return Array.isArray(i)?i.map(e=>nl(e)).reverse():Object.assign(Object.assign({},i),{oldFileName:i.newFileName,oldHeader:i.newHeader,newFileName:i.oldFileName,newHeader:i.oldHeader,hunks:i.hunks.map(e=>({oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(t=>t.startsWith("-")?`+${t.slice(1)}`:t.startsWith("+")?`-${t.slice(1)}`:t)}))})}var sl={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},Zh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Qh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Ns(i,e,t,r,n,s,o){let a;o?typeof o=="function"?a={callback:o}:a=o:a={},typeof a.context=="undefined"&&(a.context=4);let l=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){let{callback:u}=a;on(t,r,Object.assign(Object.assign({},a),{callback:f=>{let d=c(f);u(d)}}))}else return c(on(t,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(x){return x.map(function(_){return" "+_})}let d=[],g=0,y=0,m=[],b=1,w=1;for(let x=0;x<u.length;x++){let _=u[x],k=_.lines||Q_(_.value);if(_.lines=k,_.added||_.removed){if(!g){let S=u[x-1];g=b,y=w,S&&(m=l>0?f(S.lines.slice(-l)):[],g-=m.length,y-=m.length)}for(let S of k)m.push((_.added?"+":"-")+S);_.added?w+=k.length:b+=k.length}else{if(g)if(k.length<=l*2&&x<u.length-2)for(let S of f(k))m.push(S);else{let S=Math.min(k.length,l);for(let T of f(k.slice(0,S)))m.push(T);let R={oldStart:g,oldLines:b-g+S,newStart:y,newLines:w-y+S,lines:m};d.push(R),g=0,y=0,m=[]}b+=k.length,w+=k.length}}for(let x of d)for(let _=0;_<x.lines.length;_++)x.lines[_].endsWith(`
|
||||
`)?x.lines[_]=x.lines[_].slice(0,-1):(x.lines.splice(_+1,0,"\\ No newline at end of file"),_++);return{oldFileName:i,newFileName:e,oldHeader:n,newHeader:s,hunks:d}}}function cn(i,e){if(e||(e=sl),Array.isArray(i)){if(i.length>1&&!e.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return i.map(r=>cn(r,e)).join(`
|
||||
`)}let t=[];e.includeIndex&&i.oldFileName==i.newFileName&&t.push("Index: "+i.oldFileName),e.includeUnderline&&t.push("==================================================================="),e.includeFileHeaders&&(t.push("--- "+i.oldFileName+(typeof i.oldHeader=="undefined"?"":" "+i.oldHeader)),t.push("+++ "+i.newFileName+(typeof i.newHeader=="undefined"?"":" "+i.newHeader)));for(let r=0;r<i.hunks.length;r++){let n=i.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),t.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@");for(let s of n.lines)t.push(s)}return t.join(`
|
||||
`)+`
|
||||
`}function ol(i,e,t,r,n,s,o){if(typeof o=="function"&&(o={callback:o}),o!=null&&o.callback){let{callback:a}=o;Ns(i,e,t,r,n,s,Object.assign(Object.assign({},o),{callback:l=>{a(l?cn(l,o.headerOptions):void 0)}}))}else{let a=Ns(i,e,t,r,n,s,o);return a?cn(a,o==null?void 0:o.headerOptions):void 0}}function Xh(i,e,t,r,n,s){return ol(i,i,e,t,r,n,s)}function Q_(i){let e=i.endsWith(`
|
||||
`),t=i.split(`
|
||||
`).map(r=>r+`
|
||||
`);return e?t.pop():t.push(t.pop().slice(0,-1)),t}function ep(i){let e=[],t,r;for(let n=0;n<i.length;n++)t=i[n],t.added?r=1:t.removed?r=-1:r=0,e.push([r,t.value]);return e}function tp(i){let e=[];for(let t=0;t<i.length;t++){let r=i[t];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(X_(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function X_(i){let e=i;return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,"""),e}var Rb=He(op());var mw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function gw(i){try{return new URL(i)}catch{return null}}function ap(i){var e=(typeof i=="string"?gw(i):i)||{},t=e.protocol,r=e.host,n=e.port;if(typeof r!="string"||!r||typeof t!="string"||(t=t.split(":",1)[0],r=r.replace(/:\d*$/,""),n=parseInt(n)||mw[t]||0,!yw(r,n)))return"";var s=fl(t+"_proxy")||fl("all_proxy");return s&&s.indexOf("://")===-1&&(s=t+"://"+s),s}function yw(i,e){var t=fl("no_proxy").toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),s=n?n[1]:r,o=n?parseInt(n[2]):0;return o&&o!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!i.endsWith(s)):i!==s}):!0}function fl(i){return process.env[i.toLowerCase()]||process.env[i.toUpperCase()]||""}var $b=He(_p()),Mb=He(Cp()),Db=He(Rp()),qb=He(id()),Fb=He(gd()),Vb=He(fm());var Em=He(Sm(),1),{program:Om,createCommand:xN,createArgument:SN,createOption:EN,CommanderError:ON,InvalidArgumentError:kN,InvalidOptionArgumentError:CN,Command:TN,Argument:AN,Option:km,Help:IN}=Em.default;var jb=He(Nm()),Hb=He(fg());var tO=He(mg(),1),zc=He(qc(),1),Jc=He(jc(),1),p0=He(Yc(),1),Zc=He(h0(),1);var d0=p0.default;var Ub=He(ib()),zA=Lb.default,JA=Pb.default,QA=ZA,XA=al,eI=Rb.default,tI=Mb.default,iI=Bb(),rI=iI,nI=Db.default,sI=qb.default,oI=Fb.default,aI=jb.default,lI=d0,cI=Zc.default,uI=zc.default,fI=Jc.default,hI=Ub.default;0&&(module.exports={HttpsProxyAgent,PNG,ProgramOption,SocksProxyAgent,colors,debug,diff,dotenv,getProxyForUrl,ini,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml});
|
||||
/*! Bundled license information:
|
||||
|
||||
progress/lib/node-progress.js:
|
||||
(*!
|
||||
* node-progress
|
||||
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
||||
* MIT Licensed
|
||||
*)
|
||||
*/
|
||||
+1066
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user