@visulima/vis 1.0.0-alpha.14 → 1.0.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/LICENSE.md +1023 -277
- package/dist/bin.js +1 -1
- package/dist/config/index.d.ts +121 -94
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/bin.js +305 -302
- package/dist/packem_chunks/config.js +18 -0
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +5 -5
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +4 -4
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +5 -5
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -1
- package/dist/packem_chunks/handler21.js +18 -1
- package/dist/packem_chunks/handler22.js +1 -5
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +5 -3
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +3 -1
- package/dist/packem_chunks/handler27.js +1 -7
- package/dist/packem_chunks/handler28.js +1 -23
- package/dist/packem_chunks/handler29.js +7 -3
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +23 -18
- package/dist/packem_chunks/handler31.js +3 -1
- package/dist/packem_chunks/handler32.js +1 -2
- package/dist/packem_chunks/handler33.js +2 -25
- package/dist/packem_chunks/handler34.js +25 -2
- package/dist/packem_chunks/handler35.js +3 -3
- package/dist/packem_chunks/handler36.js +20 -20
- package/dist/packem_chunks/handler37.js +3 -3
- package/dist/packem_chunks/handler38.js +4 -4
- package/dist/packem_chunks/handler39.js +11 -11
- package/dist/packem_chunks/handler40.js +5 -5
- package/dist/packem_chunks/handler41.js +10 -24
- package/dist/packem_chunks/handler42.js +24 -10
- package/dist/packem_chunks/handler43.js +5 -5
- package/dist/packem_chunks/handler44.js +6 -6
- package/dist/packem_chunks/handler45.js +3 -3
- package/dist/packem_chunks/handler46.js +11 -11
- package/dist/packem_chunks/handler47.js +161 -36
- package/dist/packem_chunks/handler48.js +6 -6
- package/dist/packem_chunks/handler5.js +5 -5
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +2 -2
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +2 -2
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/tar.js +1 -1
- package/dist/packem_shared/{ai-analysis-Dzs_nUwM.js → ai-analysis-C_GpXikx.js} +3 -3
- package/dist/packem_shared/ai-cache-DrCLD4gc.js +1 -0
- package/dist/packem_shared/ai-fix-CWOz12Om.js +43 -0
- package/dist/packem_shared/applyDefaults-DLY94gWA.js +1 -0
- package/dist/packem_shared/cache-directory-C_U1qsIw.js +1 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-YdgNVvoz.js +2 -0
- package/dist/packem_shared/docker-Dl0AoVTZ.js +60 -0
- package/dist/packem_shared/failure-log-CSC6KfcO.js +2 -0
- package/dist/packem_shared/flakiness-Dzz-I3dB.js +1 -0
- package/dist/packem_shared/{giget-BX2ixMoa.js → giget-CcEy_Elm.js} +2 -2
- package/dist/packem_shared/lifecycle-BC6Nst6i.js +2 -0
- package/dist/packem_shared/lockfile-i-qvq_k8.js +1 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/readTomlSync-1fKo0R52-DtxWULlF.js +109 -0
- package/dist/packem_shared/run-summary-utils-CJv75pla.js +1 -0
- package/dist/packem_shared/runtime-check-CBU6W8qG.js +1 -0
- package/dist/packem_shared/{selectors-BvtUXWGY.js → selectors-B2ISH581.js} +1 -1
- package/dist/packem_shared/toolchain-B7dckBQ1.js +5 -0
- package/dist/packem_shared/typosquats-B3A38-qx.js +1 -0
- package/dist/packem_shared/verify-WDStBFvK.js +1 -0
- package/dist/packem_shared/vis-update-app-D0uL3eO5.js +1 -0
- package/package.json +13 -15
- package/schemas/project.schema.json +12 -2
- package/schemas/vis-config.schema.json +248 -3
- package/dist/packem_chunks/applyDefaults.js +0 -2
- package/dist/packem_shared/ai-cache-Dtvmbsru.js +0 -1
- package/dist/packem_shared/ai-fix-BmLM72GS.js +0 -43
- package/dist/packem_shared/cache-directory-xASJia6M.js +0 -1
- package/dist/packem_shared/dependency-scan-DmwPKwLy.js +0 -2
- package/dist/packem_shared/docker-CA-scYu0.js +0 -2
- package/dist/packem_shared/failure-log-fD4DiFb1.js +0 -2
- package/dist/packem_shared/flakiness-BIg1rwvp.js +0 -1
- package/dist/packem_shared/index-OlP7U_t5.js +0 -6
- package/dist/packem_shared/lockfile-BXylopgH.js +0 -1
- package/dist/packem_shared/otelPlugin-y5hoCw4b.js +0 -1
- package/dist/packem_shared/registry-BHqKXiLb.js +0 -2
- package/dist/packem_shared/run-summary-utils-D39XBHWW.js +0 -1
- package/dist/packem_shared/runtime-check-BaKni2y1.js +0 -1
- package/dist/packem_shared/toolchain-B7sIiJxK.js +0 -5
- package/dist/packem_shared/typosquats-XkC1CnOa.js +0 -1
- package/dist/packem_shared/verify-BVTcVfoW.js +0 -1
- package/dist/packem_shared/vis-update-app-DR8c4OfG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var H=Object.defineProperty;var k=(e,r)=>H(e,"name",{value:r,configurable:!0});import{createRequire as B}from"node:module";import{renderToString as z
|
|
1
|
+
var H=Object.defineProperty;var k=(e,r)=>H(e,"name",{value:r,configurable:!0});import{createRequire as B}from"node:module";import{renderToString as z}from"@visulima/tui";import{Box as U}from"@visulima/tui/components/box";import{Table as W}from"@visulima/tui/components/table";import{Text as y}from"@visulima/tui/components/text";import v from"react";import{k as K,T as G,R as Y,j as X}from"./ai-cache-DrCLD4gc.js";const F=B(import.meta.url),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=k(e=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[r,a]=w.versions.node.split(".").map(Number);if(r>22||r===22&&a>=3||r===20&&a>=16)return w.getBuiltinModule(e)}return F(e)},"__cjs_getBuiltinModule"),{spawn:D,execFileSync:O}=$("node:child_process"),{existsSync:T}=$("node:fs"),{platform:J,homedir:R}=$("node:os"),{join:g}=$("node:path"),Q=/v?(\d+\.\d+\.\d+(?:-[\w.]+)?)/,Z=5e3,ee=1e4,re=3e5,te=4096,E=J()==="win32",M=["amp","claude","codex","copilot","crush","cursor","droid","gemini","kimi","opencode","qwen"];var ae=Object.defineProperty,ne=k((e,r)=>ae(e,"name",{value:r,configurable:!0}),"A$1"),ie=Object.defineProperty,m=ne((e,r)=>ie(e,"name",{value:r,configurable:!0}),"o"),oe=Object.defineProperty,se=m((e,r)=>oe(e,"name",{value:r,configurable:!0}),"a$6");const ce={alternateCommands:[],buildArgs:se((e,r,a)=>["-x",e,"--dangerously-allow-all"],"buildArgs"),command:"amp",defaultModel:"",envVariable:"AMP_PATH"};var le=Object.defineProperty,ue=m((e,r)=>le(e,"name",{value:r,configurable:!0}),"t$8");const de={alternateCommands:[],buildArgs:ue((e,r,a)=>["--dangerously-skip-permissions","--model",r,"--output-format","text","-p",e],"buildArgs"),command:"claude",defaultModel:"claude-sonnet-4-20250514",envVariable:"CLAUDE_PATH"};var me=Object.defineProperty,pe=m((e,r)=>me(e,"name",{value:r,configurable:!0}),"a$4");const ge={alternateCommands:["openai-codex"],buildArgs:pe((e,r,a)=>[e,"--approval-mode","full-auto","--quiet","--model",r,"--max-tokens",String(a)],"buildArgs"),command:"codex",defaultModel:"o3",envVariable:"CODEX_PATH"};var fe=Object.defineProperty,he=m((e,r)=>fe(e,"name",{value:r,configurable:!0}),"l");const ve={alternateCommands:[],buildArgs:he((e,r,a)=>{const t=["-p",e,"--allow-all-tools"];return r&&t.push("--model",r),t},"buildArgs"),command:"copilot",defaultModel:"",envVariable:"COPILOT_PATH"};var ye=Object.defineProperty,be=m((e,r)=>ye(e,"name",{value:r,configurable:!0}),"n$2");const ke={alternateCommands:[],buildArgs:be((e,r,a)=>{const t=["run","--yolo"];return r&&t.push("-m",r),t.push(e),t},"buildArgs"),command:"crush",defaultModel:"",envVariable:"CRUSH_PATH"};var we=Object.defineProperty,Ae=m((e,r)=>we(e,"name",{value:r,configurable:!0}),"t$5");const $e={alternateCommands:["cursor"],buildArgs:Ae((e,r,a)=>{const t=["-p","--force","--output-format","text"];return r&&t.push("--model",r),t.push(e),t},"buildArgs"),command:"agent",defaultModel:"",envVariable:"CURSOR_PATH"};var Se=Object.defineProperty,Pe=m((e,r)=>Se(e,"name",{value:r,configurable:!0}),"i");const Te={alternateCommands:[],buildArgs:Pe((e,r,a)=>{const t=[e,"--skip-permissions-unsafe","-o","text"];return r&&t.push("-m",r),t},"buildArgs"),command:"droid",defaultModel:"",envVariable:"DROID_PATH"};var Ce=Object.defineProperty,je=m((e,r)=>Ce(e,"name",{value:r,configurable:!0}),"o$1");const Oe={alternateCommands:["gemini-cli"],buildArgs:je((e,r,a)=>["--sandbox","--model",r,"--max-output-tokens",String(a),"-p",e],"buildArgs"),command:"gemini",defaultModel:"gemini-2.5-pro",envVariable:"GEMINI_PATH"};var Re=Object.defineProperty,Ee=m((e,r)=>Re(e,"name",{value:r,configurable:!0}),"o");const Me={alternateCommands:[],buildArgs:Ee((e,r,a)=>{const t=["--quiet","-p",e];return r&&t.push("-m",r),t},"buildArgs"),command:"kimi",defaultModel:"",envVariable:"KIMI_PATH"};var xe=Object.defineProperty,_e=m((e,r)=>xe(e,"name",{value:r,configurable:!0}),"r");const Ie={alternateCommands:[],buildArgs:_e((e,r,a)=>{const t=["run",e];return r&&t.push("-m",r),t},"buildArgs"),command:"opencode",defaultModel:"anthropic/claude-sonnet-4",envVariable:"OPENCODE_PATH"};var Ne=Object.defineProperty,Le=m((e,r)=>Ne(e,"name",{value:r,configurable:!0}),"n");const qe={alternateCommands:["qwen-code"],buildArgs:Le((e,r,a)=>["-p",e,"--yolo","-o","text"],"buildArgs"),command:"qwen",defaultModel:"",envVariable:"QWEN_PATH"};var Ve=Object.defineProperty,f=m((e,r)=>Ve(e,"name",{value:r,configurable:!0}),"s");const x={amp:ce,claude:de,codex:ge,copilot:ve,crush:ke,cursor:$e,droid:Te,gemini:Oe,kimi:Me,opencode:Ie,qwen:qe},C=f(e=>e.startsWith("~")?g(R(),e.slice(1)):e,"resolveHome"),He=f(e=>{try{const r=O(E?"where":"which",[e],{encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:Z}).trim().split(`
|
|
2
2
|
`)[0]?.trim();return r&&r.length>0?r:void 0}catch{return}},"whichCommand"),Be=f(e=>{const r=R();if(E){const a=process.env.APPDATA??"",t=process.env.LOCALAPPDATA??"",n=process.env.ProgramFiles??"";return[g(a,"npm",`${e}.cmd`),g(a,"npm",e),g(t,"Programs",e,`${e}.exe`),g(n,e,`${e}.exe`),g(r,".npm-global","bin",`${e}.cmd`)]}return[`/opt/homebrew/bin/${e}`,`/usr/local/bin/${e}`,g(r,".npm-global","bin",e),g(r,".local","bin",e),g(r,".cargo","bin",e)]},"getKnownPaths"),S=f(e=>{try{const r=O(e,["--version"],{encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:ee}),a=Q.exec(r);return a?a[1]:void 0}catch{return}},"detectVersion"),_=f(e=>{const r=x[e],a={available:!1,name:e},t=process.env[r.envVariable];if(t&&T(C(t))){const i=C(t);return{...a,available:!0,detectionMethod:"envvar",path:i,version:S(i)}}const n=[r.command,...r.alternateCommands];for(const i of n){const o=He(i);if(o)return{...a,available:!0,detectionMethod:"which",path:o,version:S(o)}}for(const i of n)for(const o of Be(i))if(T(o))return{...a,available:!0,detectionMethod:"known-path",path:o,version:S(o)};return a},"detectProvider"),Fe=f(()=>M.map(e=>_(e)),"detectAllProviders"),De=f(()=>Fe().filter(e=>e.available),"detectAvailableProviders"),Je=f((e,r,a={})=>{const t=x[e],n=a.model??t.defaultModel,i=a.maxTokens??te;return t.buildArgs(r,n,i)},"buildCliArgs"),ze=f(async(e,r,a={})=>{if(!e.available||!e.path)throw new Error(`AI provider "${e.name}" is not available.`);const t=Je(e.name,r,a),n=a.timeoutMs??re;return new Promise((i,o)=>{const p={env:{...process.env,FORCE_COLOR:"0",NO_COLOR:"1"},stdio:["pipe","pipe","pipe"]},s=D(e.path,t,p);s.stdin.end();let c="",d="",u=!1;const b=setTimeout(()=>{u=!0,s.kill("SIGTERM"),o(new Error(`${e.name} CLI timed out after ${String(n)}ms`))},n);s.stdout.on("data",h=>{c+=h.toString("utf8")}),s.stderr.on("data",h=>{d+=h.toString("utf8")}),s.on("close",h=>{clearTimeout(b),!u&&(h===0?i({provider:e.name,stderr:d,stdout:c}):o(new Error(`${e.name} CLI exited with code ${String(h)}: ${d||c}`)))}),s.on("error",h=>{clearTimeout(b),u||o(new Error(`Failed to spawn ${e.name} CLI: ${h.message}`))})})},"runProvider");var Ue=Object.defineProperty,I=k((e,r)=>Ue(e,"name",{value:r,configurable:!0}),"i");const We=12e4,Ke=2,Ge=1e3,Ye=I(e=>new Promise(r=>{setTimeout(r,e)}),"sleep"),N=I(async(e,r,a=Ke)=>{let t;for(let n=0;n<=a;n+=1)try{return(await ze(e,r,{timeoutMs:We})).stdout}catch(i){if(t=i instanceof Error?i:new Error(String(i)),t.message.includes("timed out"))throw t;if(n<a){const o=Ge*2**n;await Ye(o)}}throw t??new Error("AI request failed after retries")},"runWithRetry");var Xe=Object.defineProperty,l=k((e,r)=>Xe(e,"name",{value:r,configurable:!0}),"c");const Qe={amp:30,claude:80,codex:60,copilot:50,crush:35,cursor:40,droid:20,gemini:100,kimi:25,opencode:35,qwen:30},Ze=l(e=>{if(e?.provider){if(!M.includes(e.provider))return;const t=_(e.provider);return t.available?t:void 0}const r=De();if(r.length===0)return;const a={...Qe,...e?.priority};return r.toSorted((t,n)=>(a[n.name]??0)-(a[t.name]??0))[0]},"resolveProvider"),er=new Set(["defer","review","skip","update"]),rr=new Set(["critical","high","low","medium"]),tr=new Set(["high","low","medium"]),ar=50,P=30,nr=l(e=>e.map(r=>{const a=r.vulnerabilities&&r.vulnerabilities.length>0?` [VULNERABILITIES: ${r.vulnerabilities.map(n=>`${n.severity} ${n.id}`).join(", ")}]`:"";let t="";if(r.socketReport){const n=Math.round(r.socketReport.score.overall*100),i=[`score:${String(n)}%`];if(r.socketReport.alerts.length>0){const o={};for(const s of r.socketReport.alerts)o[s.severity]=(o[s.severity]??0)+1;const p=Object.entries(o).map(([s,c])=>`${String(c)} ${s}`).join(", ");i.push(`alerts: ${p}`)}i.push(`supply-chain:${String(Math.round(r.socketReport.score.supplyChain*100))}%`),i.push(`quality:${String(Math.round(r.socketReport.score.quality*100))}%`),t=` [SOCKET.DEV: ${i.join(", ")}]`}return`- ${r.packageName}: ${r.currentRange} → ${r.newRange} (${r.updateType})${a}${t}`}).join(`
|
|
3
3
|
`),"buildPackageList"),A=`Respond ONLY with valid JSON in this exact structure:
|
|
4
4
|
{
|
|
@@ -60,9 +60,9 @@ For each package:
|
|
|
60
60
|
5. Flag any packages where skipping the update poses security risk
|
|
61
61
|
6. If Socket.dev scores are provided, factor in supply chain and quality scores — low scores indicate higher risk
|
|
62
62
|
|
|
63
|
-
${A}`,"security")},or=new Set(["compatibility","impact","recommend","security"])
|
|
63
|
+
${A}`,"security")},or=new Set(["compatibility","impact","recommend","security"]),$r=l(e=>or.has(e)?e:"impact","validateAnalysisType"),L=l((e,r="impact")=>{const a=nr(e);return ir[r](a)},"buildAnalysisPrompt"),sr=/```(?:json)?\s*([\s\S]*?)```/,cr=/\{[\s\S]*\}/,lr=l(e=>{try{return JSON.parse(e)}catch{}const r=sr.exec(e);if(r?.[1])try{return JSON.parse(r[1])}catch{}const a=cr.exec(e);if(a?.[0])try{return JSON.parse(a[0])}catch{}},"extractJson"),ur=l(e=>({action:er.has(e.action)?e.action:"review",breakingChanges:Array.isArray(e.breakingChanges)?e.breakingChanges:[],effort:tr.has(e.effort)?e.effort:"medium",package:typeof e.package=="string"?e.package:"",reason:typeof e.reason=="string"?e.reason:"",riskLevel:rr.has(e.riskLevel)?e.riskLevel:"medium"}),"normalizeRecommendation"),q=l((e,r,a)=>{const t=lr(e);if(!t||typeof t!="object")return{analysisType:a,provider:r,recommendations:[],summary:"Failed to parse AI response.",warnings:["AI response was not valid JSON."]};const n=t,i=Array.isArray(n.recommendations)?n.recommendations:[];return{analysisType:a,provider:r,recommendations:i.map(o=>ur(o)),summary:typeof n.summary=="string"?n.summary:"",warnings:Array.isArray(n.warnings)?n.warnings:[]}},"parseAiResponse"),dr={eslint:["ESLint 9.0: Flat config required","ESLint 8.0+: New rule formats"],next:["Next.js 13+: App router changes","Next.js 14+: Server components default"],react:["React 17 to 18: Concurrent features","React 18+: Strict mode changes"],typescript:["TypeScript 5.0: New decorators","TypeScript 4.7+: ESM changes"],vite:["Vite 5: Node.js 18+ required"],vue:["Vue 3: Composition API","Vue 3: Breaking template changes"],webpack:["Webpack 5: Node.js polyfills removed"]},mr=new Set(["bcrypt","cors","crypto-js","express-session","helmet","jose","jsonwebtoken","node-forge","oauth","passport"]),j=l((e,r)=>{const a=e.map(t=>{const n=t.vulnerabilities&&t.vulnerabilities.length>0,i=mr.has(t.packageName),o=dr[t.packageName]??[];let p="low",s="update",c="low",d="Patch/minor update, safe to apply.";return t.updateType==="major"?(p="high",s=o.length>0?"review":"update",c="medium",d=o.length>0?`Major update with known breaking changes: ${o[0]}`:"Major version update, review changelog before applying."):t.updateType==="minor"&&(p="medium",d="Minor update, generally safe."),n&&(p="high",s="update",d="Security update — current version has known vulnerabilities."),i&&t.updateType==="major"&&(s="review",d="Security-sensitive package with major update, careful review needed.",c="high"),{action:s,breakingChanges:o,effort:c,package:t.packageName,reason:d,riskLevel:p}});return{analysisType:r,provider:"rule-engine",recommendations:a,summary:`Rule-based ${r} analysis for ${String(e.length)} packages.`,warnings:["No AI provider available — using built-in rule engine."]}},"ruleBasedAnalysis"),pr=l(async(e,r,a)=>{const t=L(r,a),n=await N(e,t);return q(n,e.name,a)},"analyzeChunk"),gr=l((e,r,a)=>{const t=[],n=[],i=[];for(const o of e)t.push(...o.recommendations),n.push(...o.warnings),o.summary&&i.push(o.summary);return{analysisType:a,provider:r,recommendations:t,summary:i.length===1?i[0]??"":`Analyzed ${String(t.length)} packages in ${String(e.length)} batches.`,warnings:[...new Set(n)]}},"mergeResults"),V={compatibility:"Compatibility",impact:"Impact",recommend:"Recommendations",security:"Security"},Sr=l(e=>{const r=`${V[e.analysisType]??e.analysisType} Analysis (${e.provider})`,a=e.recommendations.flatMap(n=>{const i=[{action:n.action,effort:n.effort,package:n.package,reason:n.reason,risk:n.riskLevel}];return n.breakingChanges.length>0&&i.push({action:"",effort:"",package:"",reason:`Breaking: ${n.breakingChanges.join("; ")}`,risk:""}),i}),t=process.stdout.columns||80;return z(v.createElement(U,{borderStyle:"round",flexDirection:"column",paddingLeft:1,paddingRight:1},v.createElement(y,{bold:!0},r),v.createElement(y,null,""),v.createElement(y,null,e.summary),v.createElement(y,null,""),v.createElement(W,{borderStyle:"none",data:a}),...e.warnings.length>0?[v.createElement(y,null,""),...e.warnings.map((n,i)=>v.createElement(y,{dimColor:!0,key:String(i)},` ${n}`))]:[]),{columns:t})},"formatAiAnalysis");l(e=>JSON.stringify(e,void 0,2),"formatAiAnalysisJson");const Pr=l(async(e,r,a,t="impact")=>{const n=Ze(a);if(!n)return r.info(`No AI CLI tool found, using rule-based analysis.
|
|
64
64
|
`),j(e,t);const i=K(n.name,t,e),o=G(i);if(o)return r.info(`Using cached ${t} analysis from ${o.provider}.
|
|
65
65
|
`),o;const p=V[t]??t;r.info(`Running ${p.toLowerCase()} analysis with ${n.name}...
|
|
66
66
|
`);try{let s;if(e.length>ar){r.info(`Splitting ${String(e.length)} packages into batches of ${String(P)}...
|
|
67
67
|
`);const c=[];for(let u=0;u<e.length;u+=P)c.push(e.slice(u,u+P));const d=[];for(let u=0;u<c.length;u+=1){r.info(` Batch ${String(u+1)}/${String(c.length)}...`);const b=c[u];b&&d.push(await pr(n,b,t))}s=gr(d,n.name,t)}else{const c=await N(n,L(e,t));s=q(c,n.name,t)}return Y(i,s,X(t,a?.cacheTtl)),s}catch(s){const c=s instanceof Error?s.message:String(s);return r.warn(`AI analysis failed (${c}), falling back to rule engine.
|
|
68
|
-
`),j(e,t)}},"runAiAnalysis");export{
|
|
68
|
+
`),j(e,t)}},"runAiAnalysis");export{$r as H,ze as O,Qe as R,Sr as Z,Fe as _,Ze as b,Pr as e,N as r,lr as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S=Object.defineProperty;var g=(t,e)=>S(t,"name",{value:e,configurable:!0});import{createRequire as _}from"node:module";import{X as v}from"./xxh3-DrAUNq4n.js";import{M as c,h as w,a as d,n as j}from"../packem_chunks/config.js";import{l as A}from"../packem_chunks/bin.js";const M=_(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=g(t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,r]=u.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return u.getBuiltinModule(t)}return M(t)},"__cjs_getBuiltinModule"),{rmSync:f,writeFileSync:h,readdirSync:p,statSync:D}=b("node:fs");var B=Object.defineProperty,n=g((t,e)=>B(t,"name",{value:e,configurable:!0}),"r");const a=n(()=>c(A(),"ai"),"getCacheDirectory"),J=3600*1e3,N=1800*1e3,C=n(()=>{w(a())},"ensureCacheDirectory"),k=n((t,e,r)=>{const s=r.map(i=>({currentRange:i.currentRange,name:i.packageName,targetVersion:i.targetVersion})).toSorted((i,y)=>i.name.localeCompare(y.name)),o=JSON.stringify({analysisType:e,packages:s,provider:t});return v(Buffer.from(o))},"buildCacheKey"),q=n(t=>{const e=c(a(),`${t}.json`);if(d(e))try{const r=j(e);if(Date.now()-r.createdAt>r.ttlMs){f(e,{force:!0});return}return r.result}catch{f(e,{force:!0});return}},"getCachedAnalysis"),z=n((t,e,r)=>{C();const s=a(),o={createdAt:Date.now(),result:e,ttlMs:r};h(c(s,`${t}.json`),JSON.stringify(o,void 0,2),"utf8")},"setCachedAnalysis"),V=n((t,e)=>e!==void 0&&e>0?e:t==="security"?N:J,"getTtlForAnalysisType"),F=n(()=>{const t=a();if(!d(t))return{entries:0,newestEntry:void 0,oldestEntry:void 0,totalSizeBytes:0};const e=p(t).filter(i=>i.endsWith(".json"));let r=0,s,o;for(const i of e){const y=c(t,i),m=D(y);r+=m.size;const{mtimeMs:l}=m;(s===void 0||l<s)&&(s=l),(o===void 0||l>o)&&(o=l)}return{entries:e.length,newestEntry:o,oldestEntry:s,totalSizeBytes:r}},"getCacheStats"),K=n(t=>v(Buffer.from(JSON.stringify(t))),"buildHashCacheKey"),P=n(t=>{const e=c(a(),`${t}.json`);if(d(e))try{const r=j(e);if(Date.now()-r.createdAt>r.ttlMs){f(e,{force:!0});return}return r.result}catch{f(e,{force:!0});return}},"getCachedJson"),W=n((t,e,r)=>{C();const s=a(),o={createdAt:Date.now(),result:e,ttlMs:r};h(c(s,`${t}.json`),JSON.stringify(o,void 0,2),"utf8")},"setCachedJson"),x=n(()=>{const t=a();if(!d(t))return 0;const e=p(t).filter(r=>r.endsWith(".json"));for(const r of e)f(c(t,r),{force:!0});return e.length},"clearCache");export{x as B,F as J,K as M,P as N,W as O,z as R,q as T,V as j,k};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var O=Object.defineProperty;var f=(t,e)=>O(t,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import{readLastRunSummary as T}from"@visulima/task-runner";import{a as k}from"./failure-log-CSC6KfcO.js";import{r as j,f as y,a as D,d as _}from"./run-summary-utils-CJv75pla.js";import{Q as N}from"../packem_chunks/bin.js";import{b as $,C as b,M as A,z as E}from"../packem_chunks/config.js";import{w as B,b as H,r as W}from"./ai-analysis-C_GpXikx.js";import{M as q,N as L,O as Y}from"./ai-cache-DrCLD4gc.js";const C=F(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=f(t=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,a]=l.versions.node.split(".").map(Number);if(e>22||e===22&&a>=3||e===20&&a>=16)return l.getBuiltinModule(t)}return C(t)},"__cjs_getBuiltinModule"),{readFile:M,writeFile:R}=I("node:fs/promises");var z=Object.defineProperty,m=f((t,e)=>z(t,"name",{value:e,configurable:!0}),"u");const J=32*1024,K=m((t,e)=>{if(t.length<=e)return t;const a=t.slice(-e),o=t.length-a.length;return`[…${String(o)} bytes truncated from head…]
|
|
2
|
+
${a}`},"truncateHead"),U=m(async(t,e)=>e===void 0?T(t,{dataDirectory:N(t)}):j(t,e),"loadSummary"),xt=m(async(t,e,a={})=>{const o=a.terminalOutputLimit??J,[n,r]=await Promise.all([k(t,e),U(t,a.runId)]),i=r?y(r,e):void 0;if(!n&&!i)return;let s,c;if(r&&i){const d=await D(t,r.id),g=d?y(d,e):void 0;s=_(i.hashDetails,g?.hashDetails),c=d?.id}const h=n?.terminalOutput??"";return{command:n?.command??void 0,cwd:n?.cwd??void 0,dependencies:i?.dependencies??[],duration:i?.duration,exitCode:n?.exitCode??i?.exitCode,hash:i?.hash??n?.hash,hashDetails:i?.hashDetails,hashDiff:s,previousRunId:c,project:i?.target.project,runId:r?.id??n?.runId,status:n?.status??(i?G(i):void 0),target:i?.target.target,taskId:e,terminalOutput:K(h,o),terminalOutputCaptured:!!n,timestamp:n?.timestamp??i?.endTime??i?.startTime}},"aggregateFailureContext"),G=m(t=>{if(t.exitCode!==void 0&&t.exitCode!==0)return"failure";switch(t.cacheStatus){case"HIT":return"local-cache";case"REMOTE_HIT":return"remote-cache";case"SKIPPED":return"skipped";default:return t.exitCode===0?"success":void 0}},"mapCacheStatusToTaskStatus");var Q=Object.defineProperty,u=f((t,e)=>Q(t,"name",{value:e,configurable:!0}),"a");const V=3600*1e3,S=80,X=new Set(["high","low","medium"]),Z=u(()=>`You are an expert software engineer helping fix a failing build/test/lint task.
|
|
3
|
+
|
|
4
|
+
You will be given:
|
|
5
|
+
- The terminal output (stdout/stderr) from the failed task.
|
|
6
|
+
- Optional metadata: command, working directory, project, task hash, and a diff describing what changed in the task's hash inputs since the previous run that did not fail.
|
|
7
|
+
|
|
8
|
+
Your job:
|
|
9
|
+
1. Identify the root cause from the terminal output.
|
|
10
|
+
2. Propose a minimal set of source-file patches that fix the cause.
|
|
11
|
+
3. If you cannot determine a safe fix, set "cannotFix" with a clear, actionable explanation.
|
|
12
|
+
|
|
13
|
+
Constraints:
|
|
14
|
+
- Patches MUST be exact string replacements. The "oldString" must appear verbatim in the named file. Paths are relative to the working directory.
|
|
15
|
+
- Each "oldString" must be unique within its file. Include surrounding context so the match is unambiguous.
|
|
16
|
+
- Do NOT include unrelated cleanup, formatting changes, or speculative refactors.
|
|
17
|
+
- If the failure is environmental (missing tool, network) or requires running commands, prefer "cannotFix" over a guess.
|
|
18
|
+
- Keep "explanation" short (1-3 sentences). Reserve "reason" on each patch for why that specific edit fixes the cause.
|
|
19
|
+
|
|
20
|
+
Respond ONLY with valid JSON in this exact structure:
|
|
21
|
+
{
|
|
22
|
+
"explanation": "Brief root-cause analysis and what the fix does.",
|
|
23
|
+
"confidence": "low|medium|high",
|
|
24
|
+
"patches": [
|
|
25
|
+
{
|
|
26
|
+
"file": "path/relative/to/cwd.ts",
|
|
27
|
+
"oldString": "exact text to find",
|
|
28
|
+
"newString": "exact replacement text",
|
|
29
|
+
"reason": "why this change fixes it"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"cannotFix": "optional — set when no safe patch can be proposed"
|
|
33
|
+
}`,"buildSystemPrompt"),v=u((t,e)=>{const a=[];if(e.added.length>0&&a.push(` added: ${e.added.join(", ")}`),e.changed.length>0&&a.push(` changed: ${e.changed.join(", ")}`),e.removed.length>0&&a.push(` removed: ${e.removed.join(", ")}`),a.length!==0)return`- ${t}:
|
|
34
|
+
${a.join(`
|
|
35
|
+
`)}`},"formatBucket"),tt=u(t=>{if(!t.hashDiff)return"No hash-diff available — there is no previous run to compare against.";const e=[];t.hashDiff.commandChanged&&e.push("- command line changed since previous run");const a=v("file inputs",t.hashDiff.nodes),o=v("implicit deps",t.hashDiff.implicitDeps),n=v("runtime/env",t.hashDiff.runtime);return a&&e.push(a),o&&e.push(o),n&&e.push(n),e.length===0?"No detectable changes between this run and the previous run.":e.join(`
|
|
36
|
+
`)},"buildHashDiffSummary"),et=u(t=>{const e=[`Task: ${t.taskId}`];return t.project&&e.push(`Project: ${t.project}`),t.target&&e.push(`Target: ${t.target}`),t.command&&e.push(`Command: ${t.command}`),t.cwd&&e.push(`CWD: ${t.cwd}`),t.exitCode!==void 0&&e.push(`Exit code: ${String(t.exitCode)}`),t.hash&&e.push(`Task hash: ${t.hash}`),e.push("","Hash-diff since previous run:",tt(t),""),t.terminalOutputCaptured?e.push("Terminal output:","```",t.terminalOutput,"```"):e.push("Terminal output: <no failure log was captured for this task>",'Set "cannotFix" and tell the user to re-run with `vis run` so logs can be captured.'),e.join(`
|
|
37
|
+
`)},"buildUserPrompt"),at=u(t=>`${Z()}
|
|
38
|
+
|
|
39
|
+
${et(t)}`,"buildFixPrompt"),it=u((t,e)=>{const a=Array.isArray(t.patches)?t.patches:[],o=[];for(const r of a)typeof r.file!="string"||r.file.length===0||typeof r.oldString!="string"||r.oldString.length===0||typeof r.newString=="string"&&o.push({file:r.file,newString:r.newString,oldString:r.oldString,reason:typeof r.reason=="string"&&r.reason.length>0?r.reason:void 0});const n=typeof t.cannotFix=="string"&&t.cannotFix.length>0?t.cannotFix:void 0;return{cannotFix:n,confidence:X.has(t.confidence)?t.confidence:"low",explanation:typeof t.explanation=="string"?t.explanation:"",patches:n?[]:o,provider:e}},"normalizeFixProposal"),rt=u((t,e)=>{const a=B(t);return!a||typeof a!="object"?{cannotFix:"AI response was not valid JSON.",confidence:"low",explanation:"Failed to parse AI response.",patches:[],provider:e}:it(a,e)},"parseFixResponse"),nt=u((t,e)=>q({cwd:e.cwd??null,flow:"ai-fix",hash:e.hash??null,provider:t,taskId:e.taskId,terminalOutput:e.terminalOutput,terminalOutputCaptured:e.terminalOutputCaptured}),"buildFixCacheKey"),wt=u(async(t,e,a={})=>{const o=H(a.config);if(!o){e.warn(`No AI provider available — install one of: claude, gemini, copilot, codex.
|
|
40
|
+
`);return}const n=a.cache!==!1,r=nt(o.name,t);if(n){const i=L(r);if(i)return e.info(`Using cached fix proposal from ${i.provider}.
|
|
41
|
+
`),i}e.info(`Generating fix proposal with ${o.name}...
|
|
42
|
+
`);try{const i=await W(o,at(t)),s=rt(i,o.name);return n&&s.patches.length>0&&!s.cannotFix&&Y(r,s,V),s}catch(i){const s=i instanceof Error?i.message:String(i);e.warn(`AI fix proposal failed (${s}).
|
|
43
|
+
`);return}},"runFixAnalysis"),st=u((t,e,a)=>$(a)?b(a):b(A(e??t,a)),"resolvePatchPath"),ot=u((t,e)=>{const a=E(t,e);return a===""?!0:!a.startsWith("..")&&!$(a)},"isInsideWorkspace"),ct=u((t,e,a)=>{const o=t.indexOf(e),n=Math.max(0,o-S),r=Math.min(t.length,o+e.length+S),i=t.slice(n,r);return{previewAfter:`${t.slice(n,o)}${a}${t.slice(o+e.length,r)}`,previewBefore:i}},"buildPreview"),yt=u(async(t,e,a,o={})=>{const n=o.dryRun===!0,r=new Map,i=[];for(const s of a.patches){const c=st(t,e,s.file);if(!ot(t,c)){i.push({absolutePath:c,patch:s,status:"outside-workspace"});continue}let h=r.get(c);if(h===void 0){try{h=await M(c,"utf8")}catch(p){const w=p.code;i.push({absolutePath:c,error:w==="ENOENT"?void 0:p.message,patch:s,status:w==="ENOENT"?"missing-file":"error"});continue}r.set(c,h)}const d=h.indexOf(s.oldString);if(d===-1){i.push({absolutePath:c,patch:s,status:"no-match"});continue}if(h.indexOf(s.oldString,d+s.oldString.length)!==-1){i.push({absolutePath:c,patch:s,status:"ambiguous-match"});continue}const{previewAfter:g,previewBefore:P}=ct(h,s.oldString,s.newString),x=`${h.slice(0,d)}${s.newString}${h.slice(d+s.oldString.length)}`;if(!n)try{await R(c,x,"utf8")}catch(p){r.delete(c),i.push({absolutePath:c,error:p.message,patch:s,status:"error"});continue}r.set(c,x),i.push({absolutePath:c,patch:s,previewAfter:g,previewBefore:P,status:"applied"})}return i},"applyFixProposal");export{xt as a,wt as b,yt as c,st as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";import{p as l,O as p,k as d,l as u,r as _,i as c,j as g,I as m,X as C,e as T}from"../packem_chunks/config.js";import"jiti";import{otelPlugin as j}from"./otelPlugin-CJR2T_lk.js";import{definePlugin as S}from"./definePlugin-CWm4Dv_t.js";const n=e(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;export{l as CONFIG_FILES,p as SECURITY_DEFAULTS,d as TASK_CONFIG_FILES,u as applyDefaults,_ as defineConfig,S as definePlugin,c as defineTaskConfig,g as findVisConfigFile,m as findVisTaskConfigFile,C as loadVisConfig,T as loadVisTaskConfig,j as otelPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var l=(e,r)=>h(e,"name",{value:r,configurable:!0});import{createRequire as f}from"node:module";import{b as p,C as a,z as m}from"../packem_chunks/config.js";import{getMainWorktreeRoot as C}from"@visulima/task-runner";import{D as u}from"../packem_chunks/bin.js";const d=f(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=l(e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[r,t]=i.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return i.getBuiltinModule(e)}return d(e)},"__cjs_getBuiltinModule"),{execFileSync:_}=g("node:child_process");var v=Object.defineProperty,n=l((e,r)=>v(e,"name",{value:r,configurable:!0}),"i");const R=n((e,r,t)=>{const s=n(c=>p(c)?c:a(e,c),"normalize");if(r&&r.length>0)return s(r);if(t&&t.length>0)return s(t);const o=process.env.VIS_CACHE_DIRECTORY;return o&&o.length>0?s(o):a(e,u)},"resolveCacheDirectory"),y=n((e,r)=>r===!1?e:C(e)??e,"resolveSharedCacheRoot"),O=n((e,r,t,s)=>{const o=r??t??process.env.VIS_CACHE_DIRECTORY;if(o&&o.length>0)return R(e,r,t);const c=y(e,s);return a(c,u)},"resolveSharedCacheDirectory"),E=/[^\w.-]+/g,S=/^-+|-+$/g,b=n(e=>e.trim().replaceAll(E,"-").replaceAll(S,"").slice(0,64),"sanitizeBranchSegment"),D=n(e=>{try{const r=_("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return!r||r==="HEAD"?void 0:r}catch{return}},"detectGitBranch"),z=n((e,r,t)=>{if(t!==!0)return e;const s=D(r);if(!s)return e;const o=b(s);return o.length===0?e:a(e,"branches",o)},"applyBranchScope"),H=n((e,r)=>{const t=m(r,e);return t.length===0?!1:t!==".."&&!t.startsWith("../")&&!p(t)},"isCacheDirectoryInsideWorkspace");export{O as E,H as _,z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var r=(e,n)=>i(e,"name",{value:n,configurable:!0});var a=Object.defineProperty,l=r((e,n)=>a(e,"name",{value:n,configurable:!0}),"n");const u=l(e=>e,"definePlugin");export{u as definePlugin};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var j=Object.defineProperty;var b=(t,e)=>j(t,"name",{value:e,configurable:!0});import{e as E,aE as h,E as w,c as M,d as O,s as R}from"../packem_chunks/bin.js";import{render as A}from"@visulima/tui";import k from"react";import{jsx as i,jsxs as v}from"react/jsx-runtime";import{Box as g}from"@visulima/tui/components/box";import{Spinner as I}from"@visulima/tui/components/spinner";import{Text as f}from"@visulima/tui/components/text";import{D as S,W as Y,T as B,C as G}from"./symbols-CQmER5MT.js";import{$ as T,M as D}from"../packem_chunks/config.js";import{F as P}from"./lockfile-i-qvq_k8.js";var N=Object.defineProperty,W=b((t,e)=>N(t,"name",{value:e,configurable:!0}),"l$1");const $=W(({rows:t})=>i(g,{flexDirection:"column",children:t.map(e=>{let r;switch(e.status){case"error":{r=i(f,{color:"red",children:G});break}case"ok":{r=i(f,{color:"green",children:B});break}case"running":{r=i(f,{color:"white",children:i(I,{type:"dots"})});break}case"warn":{r=i(f,{color:"yellow",children:Y});break}default:{r=i(f,{dimColor:!0,children:S});break}}return v(g,{children:[i(g,{width:3,children:r}),i(g,{flexGrow:1,children:i(f,{children:e.label})}),e.summary?i(g,{children:v(f,{dimColor:!0,children:[S," ",e.summary]})}):null]},e.id)})}),"ScanProgressApp");var z=Object.defineProperty,l=b((t,e)=>z(t,"name",{value:e,configurable:!0}),"e");const F={error:O(h.failure),ok:M(h.success),pending:w(h.dash),skip:w(h.dash),warn:E(h.warning)},H=l((t,e,r)=>{const m=r?`${t} ${w(`— ${r}`)}`:t;return` ${F[e]} ${m}
|
|
2
|
+
`},"formatStaticRow"),te=l((t,e={})=>{const r=e.stream??process.stderr,m=typeof r.isTTY=="boolean"&&r.isTTY&&!R,u=e.live??m,n=new Map;for(const o of t)n.set(o.id,{id:o.id,label:o.label,status:"pending"});if(!u||t.length===0)return{finish:l((o,c,y)=>{const d=n.get(o);d&&(n.set(o,{...d,status:c,summary:y}),r.write(H(d.label,c,y)))},"finish"),start:l(o=>{const c=n.get(o);c&&n.set(o,{...c,status:"running"})},"start"),stop:l(()=>{},"stop")};const p=l(()=>t.map(o=>n.get(o.id)),"buildRows");let s=A(k.createElement($,{rows:p()}),{interactive:!0,patchConsole:!1});const a=l(()=>{s?.rerender(k.createElement($,{rows:p()}))},"rerender");return{finish:l((o,c,y)=>{const d=n.get(o);d&&(n.set(o,{...d,status:c,summary:y}),a())},"finish"),start:l(o=>{const c=n.get(o);c&&(n.set(o,{...c,status:"running"}),a())},"start"),stop:l(()=>{s&&(a(),s.unmount(),s=void 0)},"stop")}},"startScanProgress");var K=Object.defineProperty,x=b((t,e)=>K(t,"name",{value:e,configurable:!0}),"l");const C={bun:{file:"bun.lock",type:"bun"},npm:{file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},ne=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=T(D(t,r.file))}catch{return[]}const u=P(m,r.type);if(u.length===0)return[];const n=new Set,p=[];for(const s of u){const a=`${s.name}@${s.version}`;n.has(a)||(n.add(a),p.push({isDev:!1,name:s.name,version:s.version}))}return p},"lockedPackages"),se=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=T(D(t,r.file))}catch{return[]}const u=P(m,r.type);if(u.length===0)return[];const n=new Map;for(const s of u)n.has(s.name)||n.set(s.name,new Set),n.get(s.name).add(s.version);const p=[];for(const[s,a]of n)a.size<=1||p.push({name:s,versions:[...a]});return p.sort((s,a)=>s.name.localeCompare(a.name))},"findDuplicateDependencies");export{se as f,ne as l,te as s};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var la=Object.defineProperty;var c=(g,n)=>la(g,"name",{value:n,configurable:!0});import{createRequire as fa}from"node:module";import{h as ma,K as ui,M as Be,n as Mo,B as Vi,a as ya,z as va}from"../packem_chunks/config.js";import{aY as Aa,bh as ba}from"../packem_chunks/bin.js";const pa=fa(import.meta.url),vr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,da=c(g=>{if(typeof vr<"u"&&vr.versions&&vr.versions.node){const[n,h]=vr.versions.node.split(".").map(Number);if(n>22||n===22&&h>=3||n===20&&h>=16)return vr.getBuiltinModule(g)}return pa(g)},"__cjs_getBuiltinModule"),{cpSync:Io,lstatSync:ha,readdirSync:ga,existsSync:No,rmSync:ai,readFileSync:Wi}=da("node:fs");var Ca=Object.defineProperty,$a=c((g,n)=>Ca(g,"name",{value:n,configurable:!0}),"t$1");class vt extends Error{static{c(this,"LockfilePruneError")}static{$a(this,"LockfilePruneError")}constructor(n){super(n),this.name="LockfilePruneError"}}var Sa=Object.defineProperty,$r=c((g,n)=>Sa(g,"name",{value:n,configurable:!0}),"l");const Ea=$r(g=>{let n="",h=!1,y=!1,S=!1;for(let a=0;a<g.length;a+=1){const m=g[a],e=g[a+1];if(y){m===`
|
|
2
|
+
`&&(y=!1,n+=m);continue}if(S){m==="*"&&e==="/"&&(S=!1,a+=1);continue}if(h){if(m==="\\"){n+=m,e!==void 0&&(n+=e,a+=1);continue}m==='"'&&(h=!1),n+=m;continue}if(m==='"'){h=!0,n+=m;continue}if(m==="/"&&e==="/"){y=!0,a+=1;continue}if(m==="/"&&e==="*"){S=!0,a+=1;continue}n+=m}return n},"stripJsonComments"),wa=$r(g=>{const n=[];for(const h of[g.dependencies,g.devDependencies,g.optionalDependencies,g.peerDependencies])if(h)for(const[y,S]of Object.entries(h))typeof S=="string"&&n.push({name:y,spec:S});return n},"collectWorkspaceDeps"),ka=$r(g=>{for(const n of g)if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n},"extractMetadata"),xa=$r(g=>{if(!g)return[];const n=[];for(const h of["dependencies","optionalDependencies","peerDependencies"]){const y=g[h];y!==null&&typeof y=="object"&&!Array.isArray(y)&&n.push(...Object.keys(y))}return n},"collectMetadataDeps"),Oa=$r(g=>{if(Buffer.isBuffer(g.lockfileContent))return{message:"bun.lockb is binary; run `bun install --save-text-lockfile` to regenerate as bun.lock, then rerun `vis docker scaffold`.",status:"skipped"};const n=Ea(g.lockfileContent);let h;try{h=JSON.parse(n)}catch(v){throw new vt(`bun.lock: parse failed — ${v.message}`)}if(!h||typeof h!="object")throw new vt("bun.lock: top-level value is not an object");const y=h.workspaces??{},S=h.packages??{},a=new Set([""]);for(const v of g.closure)a.add(v.relativeRoot===""?"":v.relativeRoot);const m={},e=[];for(const[v,C]of Object.entries(y))a.has(v)&&(m[v]=C,e.push(...wa(C)));const A=new Set;for(const{name:v}of e)A.add(v);const x=[...A];for(;x.length>0;){const v=x.shift();for(const C of Object.keys(S)){if(C.split("/")[0]!==v&&C!==v)continue;const z=ka(S[C]);for(const fe of xa(z))A.has(fe)||(A.add(fe),x.push(fe))}}const b={};for(const[v,C]of Object.entries(S)){const z=v.split("/")[0];(A.has(z)||A.has(v))&&(b[v]=C)}const E={...h,packages:b,workspaces:m},O=Object.keys(S).length,F=Object.keys(b).length,$=O-F;return{content:`${JSON.stringify(E,null,2)}
|
|
3
|
+
`,message:`bun.lock: kept ${F}/${O} packages (dropped ${$})`,status:"pruned"}},"pruneBunLockfile");var ja=Object.defineProperty,ci=c((g,n)=>ja(g,"name",{value:n,configurable:!0}),"g");const jn="node_modules/",_a=ci((g,n,h)=>{let y=n;for(;;){const S=y===""?`${jn}${h}`:`${y}/${jn}${h}`;if(g[S]!==void 0)return S;if(y==="")return;const a=y.lastIndexOf(`/${jn.slice(0,-1)}/`);a===-1?y="":y=y.slice(0,a)}},"resolveDep"),Ta=ci(g=>{const n=[];for(const h of[g.dependencies,g.devDependencies,g.optionalDependencies,g.peerDependencies])if(h)for(const y of Object.keys(h))n.push(y);return n},"collectDepNames"),Ra=ci(g=>{const n=typeof g.lockfileContent=="string"?g.lockfileContent:g.lockfileContent.toString("utf8");let h;try{h=JSON.parse(n)}catch(F){throw new vt(`package-lock.json: parse failed — ${F.message}`)}if(!h||typeof h!="object")throw new vt("package-lock.json: top-level value is not an object");const y=h.packages??{},S=new Set([""]);for(const F of g.closure)F.relativeRoot!==""&&S.add(F.relativeRoot);const a=new Set,m=[];for(const F of Object.keys(y))S.has(F)&&(a.add(F),m.push(F));for(const[F,$]of Object.entries(y))$.link===!0&&typeof $.resolved=="string"&&S.has($.resolved)&&a.add(F);for(;m.length>0;){const F=m.shift(),$=y[F];if($)for(const v of Ta($)){const C=_a(y,F,v);if(!C||a.has(C))continue;a.add(C);const z=y[C];z.link===!0&&typeof z.resolved=="string"&&y[z.resolved]!==void 0&&!a.has(z.resolved)?(a.add(z.resolved),m.push(z.resolved)):m.push(C)}}const e={};for(const F of Object.keys(y))a.has(F)&&(e[F]=y[F]);const A=e[""];A&&Array.isArray(A.workspaces)&&(A.workspaces=A.workspaces.filter(F=>{if(typeof F!="string")return!1;const $=F.replace(/\/?\*+$/,"").replace(/\/$/,"");if($===""||$==="*")return!0;for(const v of S)if(v===F||v===$||v.startsWith(`${$}/`))return!0;return!1}));const x={...h,packages:e};delete x.dependencies;const b=Object.keys(y).length,E=Object.keys(e).length,O=b-E;return{content:`${JSON.stringify(x,null,2)}
|
|
4
|
+
`,message:`package-lock.json: kept ${E}/${b} entries (dropped ${O})`,status:"pruned"}},"pruneNpmLockfile");var La=Object.defineProperty,Zt=c((g,n)=>La(g,"name",{value:n,configurable:!0}),"a");const Do=Zt(g=>{let n=g.startsWith("/")?g.slice(1):g;const h=n.indexOf("(");return h!==-1&&(n=n.slice(0,h)),n},"canonicalKey"),Fa=Zt((g,n)=>{if(!(n.startsWith("link:")||n.startsWith("file:")||n.startsWith("workspace:")))return`${g}@${n}`},"resolveDepKey"),Pa=Zt(g=>{const n=[];for(const h of[g.dependencies,g.devDependencies,g.optionalDependencies])if(h)for(const[y,S]of Object.entries(h))S?.version&&n.push({name:y,version:S.version});return n},"collectImporterDeps"),Ji=Zt(g=>{const n=[];for(const h of[g.dependencies,g.optionalDependencies])if(h)for(const[y,S]of Object.entries(h))typeof S=="string"&&n.push({name:y,version:S});return n},"collectPackageDeps"),Gi=Zt(g=>{const n=new Map;if(!g)return n;for(const h of Object.keys(g)){const y=Do(h),S=n.get(y);S?S.push(h):n.set(y,[h])}return n},"buildKeyIndex"),Ia=Zt(g=>{const n=typeof g.lockfileContent=="string"?g.lockfileContent:g.lockfileContent.toString("utf8");let h;try{h=Aa(n)}catch(C){throw new vt(`pnpm-lock.yaml: parse failed — ${C.message}`)}if(!h||typeof h!="object")throw new vt("pnpm-lock.yaml: top-level value is not an object");const y=h.importers??{},S=Gi(h.packages),a=Gi(h.snapshots),m=new Set(["."]);for(const C of g.closure)m.add(C.relativeRoot===""?".":C.relativeRoot);const e={};for(const[C,z]of Object.entries(y))m.has(C)&&(e[C]=z);const A=new Set,x=new Set,b=[];for(const C of Object.values(e))for(const z of Pa(C))b.push(z);for(;b.length>0;){const{name:C,version:z}=b.shift(),fe=Fa(C,z);if(!fe)continue;const ve=Do(fe),I=a.get(ve)??a.get(fe)??[];for(const pe of I){if(x.has(pe))continue;x.add(pe);const q=h.snapshots?.[pe];if(q)for(const se of Ji(q))b.push(se)}const oe=S.get(ve)??S.get(fe)??[];for(const pe of oe){if(A.has(pe))continue;A.add(pe);const q=h.packages?.[pe];if(q&&!h.snapshots)for(const se of Ji(q))b.push(se)}}const E={lockfileVersion:h.lockfileVersion};for(const C of["settings","overrides","patchedDependencies","catalogs"])h[C]!==void 0&&(E[C]=h[C]);if(E.importers=e,h.packages){const C={};for(const z of Object.keys(h.packages))A.has(z)&&(C[z]=h.packages[z]);E.packages=C}if(h.snapshots){const C={};for(const z of Object.keys(h.snapshots))x.has(z)&&(C[z]=h.snapshots[z]);E.snapshots=C}const O=Object.keys(h.packages??{}).length,F=Object.keys(E.packages??{}).length,$=O-F,v=Object.keys(y).length-Object.keys(e).length;return{content:ba(E,{lineWidth:0}),message:`pnpm-lock.yaml: kept ${F}/${O} packages and ${Object.keys(e).length} importers (dropped ${$} packages, ${v} importers)`,status:"pruned"}},"prunePnpmLockfile");var _n={},Le={},Tn,Ki;function Na(){if(Ki)return Tn;Ki=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"a");function h(a,m){function e(){this.constructor=a}c(e,"s"),n(e,"ctor"),e.prototype=m.prototype,a.prototype=new e}c(h,"peg$subclass"),n(h,"peg$subclass");function y(a,m,e,A){this.message=a,this.expected=m,this.found=e,this.location=A,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),h(y,Error),y.buildMessage=function(a,m){var e={literal:n(function($){return'"'+x($.text)+'"'},"literal"),class:n(function($){var v="",C;for(C=0;C<$.parts.length;C++)v+=$.parts[C]instanceof Array?b($.parts[C][0])+"-"+b($.parts[C][1]):b($.parts[C]);return"["+($.inverted?"^":"")+v+"]"},"class"),any:n(function($){return"any character"},"any"),end:n(function($){return"end of input"},"end"),other:n(function($){return $.description},"other")};function A($){return $.charCodeAt(0).toString(16).toUpperCase()}c(A,"T"),n(A,"hex");function x($){return $.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(x,"q"),n(x,"literalEscape");function b($){return $.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(b,"_"),n(b,"classEscape");function E($){return e[$.type]($)}c(E,"re"),n(E,"describeExpectation");function O($){var v=new Array($.length),C,z;for(C=0;C<$.length;C++)v[C]=E($[C]);if(v.sort(),v.length>0){for(C=1,z=1;C<v.length;C++)v[C-1]!==v[C]&&(v[z]=v[C],z++);v.length=z}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"le"),n(O,"describeExpected");function F($){return $?'"'+x($)+'"':"end of input"}return c(F,"te"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(m)+" found."};function S(a,m){m=m!==void 0?m:{};var e={},A={Start:fn},x=fn,b=n(function(t){return t||[]},"peg$c0"),E=n(function(t,o,u){return[{command:t,type:o}].concat(u||[])},"peg$c1"),O=n(function(t,o){return[{command:t,type:o||";"}]},"peg$c2"),F=n(function(t){return t},"peg$c3"),$=";",v=ue(";",!1),C="&",z=ue("&",!1),fe=n(function(t,o){return o?{chain:t,then:o}:{chain:t}},"peg$c8"),ve=n(function(t,o){return{type:t,line:o}},"peg$c9"),I="&&",oe=ue("&&",!1),pe="||",q=ue("||",!1),se=n(function(t,o){return o?{...t,then:o}:t},"peg$c14"),Oe=n(function(t,o){return{type:t,chain:o}},"peg$c15"),Ae="|&",Ne=ue("|&",!1),Me="|",De=ue("|",!1),qe="=",rt=ue("=",!1),Se=n(function(t,o){return{name:t,args:[o]}},"peg$c22"),He=n(function(t){return{name:t,args:[]}},"peg$c23"),Ke="(",Qe=ue("(",!1),re=")",Fe=ue(")",!1),We=n(function(t,o){return{type:"subshell",subshell:t,args:o}},"peg$c28"),we="{",ke=ue("{",!1),Ce="}",Re=ue("}",!1),ye=n(function(t,o){return{type:"group",group:t,args:o}},"peg$c33"),Ye=n(function(t,o){return{type:"command",args:o,envs:t}},"peg$c34"),Ue=n(function(t){return{type:"envs",envs:t}},"peg$c35"),Ve=n(function(t){return t},"peg$c36"),Je=n(function(t){return t},"peg$c37"),B=/^[0-9]/,W=Ze([["0","9"]],!1,!1),ae=n(function(t,o,u){return{type:"redirection",subtype:o,fd:t!==null?parseInt(t):null,args:[u]}},"peg$c40"),be=">>",nt=ue(">>",!1),at=">&",st=ue(">&",!1),At=">",Ge=ue(">",!1),ft="<<<",et=ue("<<<",!1),ze="<&",pt=ue("<&",!1),bt="<",dt=ue("<",!1),r=n(function(t){return{type:"argument",segments:[].concat(...t)}},"peg$c53"),_=n(function(t){return t},"peg$c54"),T="$'",Z=ue("$'",!1),H="'",l=ue("'",!1),w=n(function(t){return[{type:"text",text:t}]},"peg$c59"),R='""',L=ue('""',!1),Y=n(function(){return{type:"text",text:""}},"peg$c62"),V='"',P=ue('"',!1),X=n(function(t){return t},"peg$c65"),J=n(function(t){return{type:"arithmetic",arithmetic:t,quoted:!0}},"peg$c66"),ne=n(function(t){return{type:"shell",shell:t,quoted:!0}},"peg$c67"),me=n(function(t){return{type:"variable",...t,quoted:!0}},"peg$c68"),le=n(function(t){return{type:"text",text:t}},"peg$c69"),je=n(function(t){return{type:"arithmetic",arithmetic:t,quoted:!1}},"peg$c70"),Kr=n(function(t){return{type:"shell",shell:t,quoted:!1}},"peg$c71"),Qr=n(function(t){return{type:"variable",...t,quoted:!1}},"peg$c72"),Er=n(function(t){return{type:"glob",pattern:t}},"peg$c73"),Ht=/^[^']/,Ut=Ze(["'"],!0,!1),wt=n(function(t){return t.join("")},"peg$c76"),wr=/^[^$"]/,kr=Ze(["$",'"'],!0,!1),tr=`\\
|
|
5
|
+
`,zr=ue(`\\
|
|
6
|
+
`,!1),Zr=n(function(){return""},"peg$c81"),kt="\\",xt=ue("\\",!1),Xr=/^[\\$"`]/,xr=Ze(["\\","$",'"',"`"],!1,!1),ut=n(function(t){return t},"peg$c86"),Or="\\a",jr=ue("\\a",!1),_r=n(function(){return"a"},"peg$c89"),rr="\\b",en=ue("\\b",!1),tn=n(function(){return"\b"},"peg$c92"),rn=/^[Ee]/,nn=Ze(["E","e"],!1,!1),on=n(function(){return"\x1B"},"peg$c95"),p="\\f",ge=ue("\\f",!1),Wt=n(function(){return"\f"},"peg$c98"),tt="\\n",nr=ue("\\n",!1),te=n(function(){return`
|
|
7
|
+
`},"peg$c101"),Ft="\\r",ir=ue("\\r",!1),an=n(function(){return"\r"},"peg$c104"),Tr="\\t",sn=ue("\\t",!1),Ee=n(function(){return" "},"peg$c107"),it="\\v",Rr=ue("\\v",!1),Lr=n(function(){return"\v"},"peg$c110"),Ct=/^[\\'"?]/,or=Ze(["\\","'",'"',"?"],!1,!1),ht=n(function(t){return String.fromCharCode(parseInt(t,16))},"peg$c113"),ie="\\x",Fr=ue("\\x",!1),Vt="\\u",ar=ue("\\u",!1),sr="\\U",ur=ue("\\U",!1),cr=n(function(t){return String.fromCodePoint(parseInt(t,16))},"peg$c120"),lr=/^[0-7]/,Pt=Ze([["0","7"]],!1,!1),Ot=/^[0-9a-fA-f]/,Pr=Ze([["0","9"],["a","f"],["A","f"]],!1,!1),gt=Si(),jt="{}",fr=ue("{}",!1),$t=n(function(){return"{}"},"peg$c128"),It="-",Nt=ue("-",!1),_t="+",St=ue("+",!1),pr=".",Ir=ue(".",!1),Mt=n(function(t,o,u){return{type:"number",value:(t==="-"?-1:1)*parseFloat(o.join("")+"."+u.join(""))}},"peg$c135"),Nr=n(function(t,o){return{type:"number",value:(t==="-"?-1:1)*parseInt(o.join(""))}},"peg$c136"),dr=n(function(t){return{type:"variable",...t}},"peg$c137"),Dt=n(function(t){return{type:"variable",name:t}},"peg$c138"),_e=n(function(t){return t},"peg$c139"),Mr="*",ct=ue("*",!1),lt="/",hr=ue("/",!1),qt=n(function(t,o,u){return{type:o==="*"?"multiplication":"division",right:u}},"peg$c144"),s=n(function(t,o){return o.reduce((u,f)=>({left:u,...f}),t)},"peg$c145"),d=n(function(t,o,u){return{type:o==="+"?"addition":"subtraction",right:u}},"peg$c146"),j="$((",G=ue("$((",!1),U="))",ee=ue("))",!1),de=n(function(t){return t},"peg$c151"),$e="$(",Tt=ue("$(",!1),Uo=n(function(t){return t},"peg$c154"),mt="${",gr=ue("${",!1),li=":-",Wo=ue(":-",!1),Vo=n(function(t,o){return{name:t,defaultValue:o}},"peg$c159"),fi=":-}",Jo=ue(":-}",!1),Go=n(function(t){return{name:t,defaultValue:[]}},"peg$c162"),pi=":+",Ko=ue(":+",!1),Qo=n(function(t,o){return{name:t,alternativeValue:o}},"peg$c165"),di=":+}",zo=ue(":+}",!1),Zo=n(function(t){return{name:t,alternativeValue:[]}},"peg$c168"),hi=n(function(t){return{name:t}},"peg$c169"),Xo="$",ea=ue("$",!1),ta=n(function(t){return m.isGlobPattern(t)},"peg$c172"),ra=n(function(t){return t},"peg$c173"),gi=/^[a-zA-Z0-9_]/,mi=Ze([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),yi=n(function(){return $i()},"peg$c176"),vi=/^[$@*?#a-zA-Z0-9_\-]/,Ai=Ze(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),na=/^[()}<>$|&; \t"']/,ia=Ze(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),oa=/^[<>&; \t"']/,aa=Ze(["<",">","&",";"," "," ",'"',"'"],!1,!1),bi=/^[ \t]/,Ci=Ze([" "," "],!1,!1),i=0,K=0,Dr=[{line:1,column:1}],yt=0,un=[],N=0,qr;if("startRule"in m){if(!(m.startRule in A))throw new Error(`Can't start parsing from rule "`+m.startRule+'".');x=A[m.startRule]}function $i(){return a.substring(K,i)}c($i,"Di"),n($i,"text");function sa(){return Jt(K,i)}c(sa,"er"),n(sa,"location");function ua(t,o){throw o=o!==void 0?o:Jt(K,i),ln([wi(t)],a.substring(K,i),o)}c(ua,"sr"),n(ua,"expected");function ca(t,o){throw o=o!==void 0?o:Jt(K,i),ki(t,o)}c(ca,"fr"),n(ca,"error");function ue(t,o){return{type:"literal",text:t,ignoreCase:o}}c(ue,"$"),n(ue,"peg$literalExpectation");function Ze(t,o,u){return{type:"class",parts:t,inverted:o,ignoreCase:u}}c(Ze,"y"),n(Ze,"peg$classExpectation");function Si(){return{type:"any"}}c(Si,"Qi"),n(Si,"peg$anyExpectation");function Ei(){return{type:"end"}}c(Ei,"Ri"),n(Ei,"peg$endExpectation");function wi(t){return{type:"other",description:t}}c(wi,"Vi"),n(wi,"peg$otherExpectation");function cn(t){var o=Dr[t],u;if(o)return o;for(u=t-1;!Dr[u];)u--;for(o=Dr[u],o={line:o.line,column:o.column};u<t;)a.charCodeAt(u)===10?(o.line++,o.column=1):o.column++,u++;return Dr[t]=o,o}c(cn,"bs"),n(cn,"peg$computePosDetails");function Jt(t,o){var u=cn(t),f=cn(o);return{start:{offset:t,line:u.line,column:u.column},end:{offset:o,line:f.line,column:f.column}}}c(Jt,"Z"),n(Jt,"peg$computeLocation");function D(t){i<yt||(i>yt&&(yt=i,un=[]),un.push(t))}c(D,"g"),n(D,"peg$fail");function ki(t,o){return new y(t,null,null,o)}c(ki,"Ii"),n(ki,"peg$buildSimpleError");function ln(t,o,u){return new y(y.buildMessage(t,o),t,o,u)}c(ln,"ms"),n(ln,"peg$buildStructuredError");function fn(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(u=Gt(),u===e&&(u=null),u!==e?(K=t,o=b(u),t=o):(i=t,t=e)):(i=t,t=e),t}c(fn,"ys"),n(fn,"peg$parseStart");function Gt(){var t,o,u,f,k;if(t=i,o=Yr(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=pn(),f!==e?(k=xi(),k===e&&(k=null),k!==e?(K=t,o=E(o,f,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;if(t===e)if(t=i,o=Yr(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=pn(),f===e&&(f=null),f!==e?(K=t,o=O(o,f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;return t}c(Gt,"H"),n(Gt,"peg$parseShellLine");function xi(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=Gt(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=F(u),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;return t}c(xi,"Li"),n(xi,"peg$parseShellLineThen");function pn(){var t;return a.charCodeAt(i)===59?(t=$,i++):(t=e,N===0&&D(v)),t===e&&(a.charCodeAt(i)===38?(t=C,i++):(t=e,N===0&&D(z))),t}c(pn,"xs"),n(pn,"peg$parseShellLineType");function Yr(){var t,o,u;return t=i,o=dn(),o!==e?(u=Oi(),u===e&&(u=null),u!==e?(K=t,o=fe(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(Yr,"oe"),n(Yr,"peg$parseCommandLine");function Oi(){var t,o,u,f,k,M,ce;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=ji(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Yr(),k!==e){for(M=[],ce=Q();ce!==e;)M.push(ce),ce=Q();M!==e?(K=t,o=ve(u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;return t}c(Oi,"ji"),n(Oi,"peg$parseCommandLineThen");function ji(){var t;return a.substr(i,2)===I?(t=I,i+=2):(t=e,N===0&&D(oe)),t===e&&(a.substr(i,2)===pe?(t=pe,i+=2):(t=e,N===0&&D(q))),t}c(ji,"qi"),n(ji,"peg$parseCommandLineType");function dn(){var t,o,u;return t=i,o=Ri(),o!==e?(u=_i(),u===e&&(u=null),u!==e?(K=t,o=se(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(dn,"Ss"),n(dn,"peg$parseCommandChain");function _i(){var t,o,u,f,k,M,ce;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=Ti(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=dn(),k!==e){for(M=[],ce=Q();ce!==e;)M.push(ce),ce=Q();M!==e?(K=t,o=Oe(u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;return t}c(_i,"_i"),n(_i,"peg$parseCommandChainThen");function Ti(){var t;return a.substr(i,2)===Ae?(t=Ae,i+=2):(t=e,N===0&&D(Ne)),t===e&&(a.charCodeAt(i)===124?(t=Me,i++):(t=e,N===0&&D(De))),t}c(Ti,"zi"),n(Ti,"peg$parseCommandChainType");function mr(){var t,o,u,f,k,M;if(t=i,o=wn(),o!==e)if(a.charCodeAt(i)===61?(u=qe,i++):(u=e,N===0&&D(rt)),u!==e)if(f=mn(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(K=t,o=Se(o,f),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;else i=t,t=e;if(t===e)if(t=i,o=wn(),o!==e)if(a.charCodeAt(i)===61?(u=qe,i++):(u=e,N===0&&D(rt)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=He(o),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;return t}c(mr,"fe"),n(mr,"peg$parseVariableAssignment");function Ri(){var t,o,u,f,k,M,ce,he,Te,Pe,ot;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(a.charCodeAt(i)===40?(u=Ke,i++):(u=e,N===0&&D(Qe)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Gt(),k!==e){for(M=[],ce=Q();ce!==e;)M.push(ce),ce=Q();if(M!==e)if(a.charCodeAt(i)===41?(ce=re,i++):(ce=e,N===0&&D(Fe)),ce!==e){for(he=[],Te=Q();Te!==e;)he.push(Te),Te=Q();if(he!==e){for(Te=[],Pe=Kt();Pe!==e;)Te.push(Pe),Pe=Kt();if(Te!==e){for(Pe=[],ot=Q();ot!==e;)Pe.push(ot),ot=Q();Pe!==e?(K=t,o=We(k,Te),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(a.charCodeAt(i)===123?(u=we,i++):(u=e,N===0&&D(ke)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Gt(),k!==e){for(M=[],ce=Q();ce!==e;)M.push(ce),ce=Q();if(M!==e)if(a.charCodeAt(i)===125?(ce=Ce,i++):(ce=e,N===0&&D(Re)),ce!==e){for(he=[],Te=Q();Te!==e;)he.push(Te),Te=Q();if(he!==e){for(Te=[],Pe=Kt();Pe!==e;)Te.push(Pe),Pe=Kt();if(Te!==e){for(Pe=[],ot=Q();ot!==e;)Pe.push(ot),ot=Q();Pe!==e?(K=t,o=ye(k,Te),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){for(u=[],f=mr();f!==e;)u.push(f),f=mr();if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e){if(k=[],M=gn(),M!==e)for(;M!==e;)k.push(M),M=gn();else k=e;if(k!==e){for(M=[],ce=Q();ce!==e;)M.push(ce),ce=Q();M!==e?(K=t,o=Ye(u,k),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e}else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){if(u=[],f=mr(),f!==e)for(;f!==e;)u.push(f),f=mr();else u=e;if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=Ue(u),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}}}return t}c(Ri,"Gi"),n(Ri,"peg$parseCommand");function hn(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){if(u=[],f=yr(),f!==e)for(;f!==e;)u.push(f),f=yr();else u=e;if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=Ve(u),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e;return t}c(hn,"Es"),n(hn,"peg$parseCommandString");function gn(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e?(u=Kt(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e),t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();o!==e?(u=yr(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e)}return t}c(gn,"Fs"),n(gn,"peg$parseArgument");function Kt(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(B.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(W)),u===e&&(u=null),u!==e?(f=Li(),f!==e?(k=yr(),k!==e?(K=t,o=ae(u,f,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Kt,"U"),n(Kt,"peg$parseRedirectArgument");function Li(){var t;return a.substr(i,2)===be?(t=be,i+=2):(t=e,N===0&&D(nt)),t===e&&(a.substr(i,2)===at?(t=at,i+=2):(t=e,N===0&&D(st)),t===e&&(a.charCodeAt(i)===62?(t=At,i++):(t=e,N===0&&D(Ge)),t===e&&(a.substr(i,3)===ft?(t=ft,i+=3):(t=e,N===0&&D(et)),t===e&&(a.substr(i,2)===ze?(t=ze,i+=2):(t=e,N===0&&D(pt)),t===e&&(a.charCodeAt(i)===60?(t=bt,i++):(t=e,N===0&&D(dt))))))),t}c(Li,"Zi"),n(Li,"peg$parseRedirectType");function yr(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(u=mn(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e),t}c(yr,"ie"),n(yr,"peg$parseValueArgument");function mn(){var t,o,u;if(t=i,o=[],u=yn(),u!==e)for(;u!==e;)o.push(u),u=yn();else o=e;return o!==e&&(K=t,o=r(o)),t=o,t}c(mn,"Ts"),n(mn,"peg$parseStrictValueArgument");function yn(){var t,o;return t=i,o=Fi(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Pi(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Ii(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Ni(),o!==e&&(K=t,o=_(o)),t=o))),t}c(yn,"Ps"),n(yn,"peg$parseArgumentSegment");function Fi(){var t,o,u,f;return t=i,a.substr(i,2)===T?(o=T,i+=2):(o=e,N===0&&D(Z)),o!==e?(u=qi(),u!==e?(a.charCodeAt(i)===39?(f=H,i++):(f=e,N===0&&D(l)),f!==e?(K=t,o=w(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Fi,"Hi"),n(Fi,"peg$parseCQuoteString");function Pi(){var t,o,u,f;return t=i,a.charCodeAt(i)===39?(o=H,i++):(o=e,N===0&&D(l)),o!==e?(u=Mi(),u!==e?(a.charCodeAt(i)===39?(f=H,i++):(f=e,N===0&&D(l)),f!==e?(K=t,o=w(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Pi,"Ui"),n(Pi,"peg$parseSglQuoteString");function Ii(){var t,o,u,f;if(t=i,a.substr(i,2)===R?(o=R,i+=2):(o=e,N===0&&D(L)),o!==e&&(K=t,o=Y()),t=o,t===e)if(t=i,a.charCodeAt(i)===34?(o=V,i++):(o=e,N===0&&D(P)),o!==e){for(u=[],f=vn();f!==e;)u.push(f),f=vn();u!==e?(a.charCodeAt(i)===34?(f=V,i++):(f=e,N===0&&D(P)),f!==e?(K=t,o=X(u),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;return t}c(Ii,"ki"),n(Ii,"peg$parseDblQuoteString");function Ni(){var t,o,u;if(t=i,o=[],u=An(),u!==e)for(;u!==e;)o.push(u),u=An();else o=e;return o!==e&&(K=t,o=X(o)),t=o,t}c(Ni,"Mi"),n(Ni,"peg$parsePlainString");function vn(){var t,o;return t=i,o=Sn(),o!==e&&(K=t,o=J(o)),t=o,t===e&&(t=i,o=En(),o!==e&&(K=t,o=ne(o)),t=o,t===e&&(t=i,o=Wr(),o!==e&&(K=t,o=me(o)),t=o,t===e&&(t=i,o=Di(),o!==e&&(K=t,o=le(o)),t=o))),t}c(vn,"Ds"),n(vn,"peg$parseDblQuoteStringSegment");function An(){var t,o;return t=i,o=Sn(),o!==e&&(K=t,o=je(o)),t=o,t===e&&(t=i,o=En(),o!==e&&(K=t,o=Kr(o)),t=o,t===e&&(t=i,o=Wr(),o!==e&&(K=t,o=Qr(o)),t=o,t===e&&(t=i,o=Hi(),o!==e&&(K=t,o=Er(o)),t=o,t===e&&(t=i,o=Bi(),o!==e&&(K=t,o=le(o)),t=o)))),t}c(An,"Qs"),n(An,"peg$parsePlainStringSegment");function Mi(){var t,o,u;for(t=i,o=[],Ht.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ut));u!==e;)o.push(u),Ht.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ut));return o!==e&&(K=t,o=wt(o)),t=o,t}c(Mi,"Ni"),n(Mi,"peg$parseSglQuoteStringText");function Di(){var t,o,u;if(t=i,o=[],u=bn(),u===e&&(wr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(kr))),u!==e)for(;u!==e;)o.push(u),u=bn(),u===e&&(wr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(kr)));else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(Di,"Bi"),n(Di,"peg$parseDblQuoteStringText");function bn(){var t,o,u;return t=i,a.substr(i,2)===tr?(o=tr,i+=2):(o=e,N===0&&D(zr)),o!==e&&(K=t,o=Zr()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(Xr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(xr)),u!==e?(K=t,o=ut(u),t=o):(i=t,t=e)):(i=t,t=e)),t}c(bn,"Rs"),n(bn,"peg$parseDblQuoteEscapedChar");function qi(){var t,o,u;for(t=i,o=[],u=Cn(),u===e&&(Ht.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ut)));u!==e;)o.push(u),u=Cn(),u===e&&(Ht.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ut)));return o!==e&&(K=t,o=wt(o)),t=o,t}c(qi,"Oi"),n(qi,"peg$parseCQuoteStringText");function Cn(){var t,o,u;return t=i,a.substr(i,2)===Or?(o=Or,i+=2):(o=e,N===0&&D(jr)),o!==e&&(K=t,o=_r()),t=o,t===e&&(t=i,a.substr(i,2)===rr?(o=rr,i+=2):(o=e,N===0&&D(en)),o!==e&&(K=t,o=tn()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(rn.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(nn)),u!==e?(K=t,o=on(),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===p?(o=p,i+=2):(o=e,N===0&&D(ge)),o!==e&&(K=t,o=Wt()),t=o,t===e&&(t=i,a.substr(i,2)===tt?(o=tt,i+=2):(o=e,N===0&&D(nr)),o!==e&&(K=t,o=te()),t=o,t===e&&(t=i,a.substr(i,2)===Ft?(o=Ft,i+=2):(o=e,N===0&&D(ir)),o!==e&&(K=t,o=an()),t=o,t===e&&(t=i,a.substr(i,2)===Tr?(o=Tr,i+=2):(o=e,N===0&&D(sn)),o!==e&&(K=t,o=Ee()),t=o,t===e&&(t=i,a.substr(i,2)===it?(o=it,i+=2):(o=e,N===0&&D(Rr)),o!==e&&(K=t,o=Lr()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(Ct.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(or)),u!==e?(K=t,o=ut(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=Yi()))))))))),t}c(Cn,"Vs"),n(Cn,"peg$parseCQuoteEscapedChar");function Yi(){var t,o,u,f,k,M,ce,he,Te,Pe,ot,On;return t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(u=Br(),u!==e?(K=t,o=ht(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===ie?(o=ie,i+=2):(o=e,N===0&&D(Fr)),o!==e?(u=i,f=i,k=Br(),k!==e?(M=Xe(),M!==e?(k=[k,M],f=k):(i=f,f=e)):(i=f,f=e),f===e&&(f=Br()),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=ht(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===Vt?(o=Vt,i+=2):(o=e,N===0&&D(ar)),o!==e?(u=i,f=i,k=Xe(),k!==e?(M=Xe(),M!==e?(ce=Xe(),ce!==e?(he=Xe(),he!==e?(k=[k,M,ce,he],f=k):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=ht(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===sr?(o=sr,i+=2):(o=e,N===0&&D(ur)),o!==e?(u=i,f=i,k=Xe(),k!==e?(M=Xe(),M!==e?(ce=Xe(),ce!==e?(he=Xe(),he!==e?(Te=Xe(),Te!==e?(Pe=Xe(),Pe!==e?(ot=Xe(),ot!==e?(On=Xe(),On!==e?(k=[k,M,ce,he,Te,Pe,ot,On],f=k):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=cr(u),t=o):(i=t,t=e)):(i=t,t=e)))),t}c(Yi,"Xi"),n(Yi,"peg$parseHexCodeString");function Br(){var t;return lr.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Pt)),t}c(Br,"$e"),n(Br,"peg$parseHexCodeChar0");function Xe(){var t;return Ot.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Pr)),t}c(Xe,"x"),n(Xe,"peg$parseHexCodeChar");function Bi(){var t,o,u,f,k;if(t=i,o=[],u=i,a.charCodeAt(i)===92?(f=kt,i++):(f=e,N===0&&D(xt)),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u===e&&(u=i,a.substr(i,2)===jt?(f=jt,i+=2):(f=e,N===0&&D(fr)),f!==e&&(K=u,f=$t()),u=f,u===e&&(u=i,f=i,N++,k=kn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e))),u!==e)for(;u!==e;)o.push(u),u=i,a.charCodeAt(i)===92?(f=kt,i++):(f=e,N===0&&D(xt)),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u===e&&(u=i,a.substr(i,2)===jt?(f=jt,i+=2):(f=e,N===0&&D(fr)),f!==e&&(K=u,f=$t()),u=f,u===e&&(u=i,f=i,N++,k=kn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e)));else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(Bi,"Ji"),n(Bi,"peg$parsePlainStringText");function Hr(){var t,o,u,f,k,M;if(t=i,a.charCodeAt(i)===45?(o=It,i++):(o=e,N===0&&D(Nt)),o===e&&(a.charCodeAt(i)===43?(o=_t,i++):(o=e,N===0&&D(St))),o===e&&(o=null),o!==e){if(u=[],B.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W)),f!==e)for(;f!==e;)u.push(f),B.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W));else u=e;if(u!==e)if(a.charCodeAt(i)===46?(f=pr,i++):(f=e,N===0&&D(Ir)),f!==e){if(k=[],B.test(a.charAt(i))?(M=a.charAt(i),i++):(M=e,N===0&&D(W)),M!==e)for(;M!==e;)k.push(M),B.test(a.charAt(i))?(M=a.charAt(i),i++):(M=e,N===0&&D(W));else k=e;k!==e?(K=t,o=Mt(o,u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;if(t===e){if(t=i,a.charCodeAt(i)===45?(o=It,i++):(o=e,N===0&&D(Nt)),o===e&&(a.charCodeAt(i)===43?(o=_t,i++):(o=e,N===0&&D(St))),o===e&&(o=null),o!==e){if(u=[],B.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W)),f!==e)for(;f!==e;)u.push(f),B.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W));else u=e;u!==e?(K=t,o=Nr(o,u),t=o):(i=t,t=e)}else i=t,t=e;if(t===e&&(t=i,o=Wr(),o!==e&&(K=t,o=dr(o)),t=o,t===e&&(t=i,o=Rt(),o!==e&&(K=t,o=Dt(o)),t=o,t===e)))if(t=i,a.charCodeAt(i)===40?(o=Ke,i++):(o=e,N===0&&D(Qe)),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();if(u!==e)if(f=$n(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(a.charCodeAt(i)===41?(M=re,i++):(M=e,N===0&&D(Fe)),M!==e?(K=t,o=_e(f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e}return t}c(Hr,"Ae"),n(Hr,"peg$parseArithmeticPrimary");function Ur(){var t,o,u,f,k,M,ce,he;if(t=i,o=Hr(),o!==e){for(u=[],f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===42?(M=Mr,i++):(M=e,N===0&&D(ct)),M===e&&(a.charCodeAt(i)===47?(M=lt,i++):(M=e,N===0&&D(hr))),M!==e){for(ce=[],he=Q();he!==e;)ce.push(he),he=Q();ce!==e?(he=Hr(),he!==e?(K=f,k=qt(o,M,he),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e;for(;f!==e;){for(u.push(f),f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===42?(M=Mr,i++):(M=e,N===0&&D(ct)),M===e&&(a.charCodeAt(i)===47?(M=lt,i++):(M=e,N===0&&D(hr))),M!==e){for(ce=[],he=Q();he!==e;)ce.push(he),he=Q();ce!==e?(he=Hr(),he!==e?(K=f,k=qt(o,M,he),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e}u!==e?(K=t,o=s(o,u),t=o):(i=t,t=e)}else i=t,t=e;return t}c(Ur,"de"),n(Ur,"peg$parseArithmeticTimesExpression");function $n(){var t,o,u,f,k,M,ce,he;if(t=i,o=Ur(),o!==e){for(u=[],f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===43?(M=_t,i++):(M=e,N===0&&D(St)),M===e&&(a.charCodeAt(i)===45?(M=It,i++):(M=e,N===0&&D(Nt))),M!==e){for(ce=[],he=Q();he!==e;)ce.push(he),he=Q();ce!==e?(he=Ur(),he!==e?(K=f,k=d(o,M,he),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e;for(;f!==e;){for(u.push(f),f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===43?(M=_t,i++):(M=e,N===0&&D(St)),M===e&&(a.charCodeAt(i)===45?(M=It,i++):(M=e,N===0&&D(Nt))),M!==e){for(ce=[],he=Q();he!==e;)ce.push(he),he=Q();ce!==e?(he=Ur(),he!==e?(K=f,k=d(o,M,he),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e}u!==e?(K=t,o=s(o,u),t=o):(i=t,t=e)}else i=t,t=e;return t}c($n,"Is"),n($n,"peg$parseArithmeticExpression");function Sn(){var t,o,u,f,k,M;if(t=i,a.substr(i,3)===j?(o=j,i+=3):(o=e,N===0&&D(G)),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();if(u!==e)if(f=$n(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(a.substr(i,2)===U?(M=U,i+=2):(M=e,N===0&&D(ee)),M!==e?(K=t,o=de(f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;return t}c(Sn,"Ls"),n(Sn,"peg$parseArithmetic");function En(){var t,o,u,f;return t=i,a.substr(i,2)===$e?(o=$e,i+=2):(o=e,N===0&&D(Tt)),o!==e?(u=Gt(),u!==e?(a.charCodeAt(i)===41?(f=re,i++):(f=e,N===0&&D(Fe)),f!==e?(K=t,o=Uo(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(En,"js"),n(En,"peg$parseSubshell");function Wr(){var t,o,u,f,k,M;return t=i,a.substr(i,2)===mt?(o=mt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,2)===li?(f=li,i+=2):(f=e,N===0&&D(Wo)),f!==e?(k=hn(),k!==e?(a.charCodeAt(i)===125?(M=Ce,i++):(M=e,N===0&&D(Re)),M!==e?(K=t,o=Vo(u,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===mt?(o=mt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,3)===fi?(f=fi,i+=3):(f=e,N===0&&D(Jo)),f!==e?(K=t,o=Go(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===mt?(o=mt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,2)===pi?(f=pi,i+=2):(f=e,N===0&&D(Ko)),f!==e?(k=hn(),k!==e?(a.charCodeAt(i)===125?(M=Ce,i++):(M=e,N===0&&D(Re)),M!==e?(K=t,o=Qo(u,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===mt?(o=mt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,3)===di?(f=di,i+=3):(f=e,N===0&&D(zo)),f!==e?(K=t,o=Zo(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===mt?(o=mt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.charCodeAt(i)===125?(f=Ce,i++):(f=e,N===0&&D(Re)),f!==e?(K=t,o=hi(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.charCodeAt(i)===36?(o=Xo,i++):(o=e,N===0&&D(ea)),o!==e?(u=Rt(),u!==e?(K=t,o=hi(u),t=o):(i=t,t=e)):(i=t,t=e)))))),t}c(Wr,"we"),n(Wr,"peg$parseVariable");function Hi(){var t,o,u;return t=i,o=Ui(),o!==e?(K=i,u=ta(o),u?u=void 0:u=e,u!==e?(K=t,o=ra(o),t=o):(i=t,t=e)):(i=t,t=e),t}c(Hi,"Ki"),n(Hi,"peg$parseGlob");function Ui(){var t,o,u,f,k;if(t=i,o=[],u=i,f=i,N++,k=xn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u!==e)for(;u!==e;)o.push(u),u=i,f=i,N++,k=xn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(gt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e);else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(Ui,"Wi"),n(Ui,"peg$parseGlobText");function wn(){var t,o,u;if(t=i,o=[],gi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(mi)),u!==e)for(;u!==e;)o.push(u),gi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(mi));else o=e;return o!==e&&(K=t,o=yi()),t=o,t}c(wn,"qs"),n(wn,"peg$parseEnvVariable");function Rt(){var t,o,u;if(t=i,o=[],vi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ai)),u!==e)for(;u!==e;)o.push(u),vi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ai));else o=e;return o!==e&&(K=t,o=yi()),t=o,t}c(Rt,"R"),n(Rt,"peg$parseIdentifier");function kn(){var t;return na.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(ia)),t}c(kn,"_s"),n(kn,"peg$parseSpecialShellChars");function xn(){var t;return oa.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(aa)),t}c(xn,"zs"),n(xn,"peg$parseGlobSpecialShellChars");function Q(){var t,o;if(t=[],bi.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D(Ci)),o!==e)for(;o!==e;)t.push(o),bi.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D(Ci));else t=e;return t}if(c(Q,"h"),n(Q,"peg$parseS"),qr=x(),qr!==e&&i===a.length)return qr;throw qr!==e&&i<a.length&&D(Ei()),ln(un,yt<a.length?a.charAt(yt):null,yt<a.length?Jt(yt,yt+1):Jt(yt,yt))}return c(S,"peg$parse"),n(S,"peg$parse"),Tn={SyntaxError:y,parse:S},Tn}c(Na,"requireShell$1");var Qi;function Ma(){if(Qi)return Le;Qi=1;var g=Object.defineProperty,n=c((I,oe)=>g(I,"name",{value:oe,configurable:!0}),"t");Object.defineProperty(Le,"__esModule",{value:!0}),Le.parseShell=y,Le.stringifyShellLine=S,Le.stringifyShell=S,Le.stringifyCommandLine=a,Le.stringifyCommandLineThen=m,Le.stringifyCommandChain=e,Le.stringifyCommandChainThen=A,Le.stringifyCommand=x,Le.stringifyEnvSegment=b,Le.stringifyArgument=E,Le.stringifyRedirectArgument=O,Le.stringifyValueArgument=F,Le.stringifyArgumentSegment=fe,Le.stringifyArithmeticExpression=ve,Le.stringifyShellLine=S,Le.stringifyShell=S;const h=Na();function y(I,oe={isGlobPattern:n(()=>!1,"isGlobPattern")}){try{return(0,h.parse)(I,oe)}catch(pe){throw pe.location&&(pe.message=pe.message.replace(/(\.)?$/,` (line ${pe.location.start.line}, column ${pe.location.start.column})$1`)),pe}}c(y,"parseShell"),n(y,"parseShell");function S(I,{endSemicolon:oe=!1}={}){return I.map(({command:pe,type:q},se)=>`${a(pe)}${q===";"?se!==I.length-1||oe?";":"":" &"}`).join(" ")}c(S,"stringifyShellLine"),n(S,"stringifyShellLine");function a(I){return`${e(I.chain)}${I.then?` ${m(I.then)}`:""}`}c(a,"stringifyCommandLine"),n(a,"stringifyCommandLine");function m(I){return`${I.type} ${a(I.line)}`}c(m,"stringifyCommandLineThen"),n(m,"stringifyCommandLineThen");function e(I){return`${x(I)}${I.then?` ${A(I.then)}`:""}`}c(e,"stringifyCommandChain"),n(e,"stringifyCommandChain");function A(I){return`${I.type} ${e(I.chain)}`}c(A,"stringifyCommandChainThen"),n(A,"stringifyCommandChainThen");function x(I){switch(I.type){case"command":return`${I.envs.length>0?`${I.envs.map(oe=>b(oe)).join(" ")} `:""}${I.args.map(oe=>E(oe)).join(" ")}`;case"subshell":return`(${S(I.subshell)})${I.args.length>0?` ${I.args.map(oe=>O(oe)).join(" ")}`:""}`;case"group":return`{ ${S(I.group,{endSemicolon:!0})} }${I.args.length>0?` ${I.args.map(oe=>O(oe)).join(" ")}`:""}`;case"envs":return I.envs.map(oe=>b(oe)).join(" ");default:throw new Error(`Unsupported command type: "${I.type}"`)}}c(x,"stringifyCommand"),n(x,"stringifyCommand");function b(I){return`${I.name}=${I.args[0]?F(I.args[0]):""}`}c(b,"stringifyEnvSegment"),n(b,"stringifyEnvSegment");function E(I){switch(I.type){case"redirection":return O(I);case"argument":return F(I);default:throw new Error(`Unsupported argument type: "${I.type}"`)}}c(E,"stringifyArgument"),n(E,"stringifyArgument");function O(I){return`${I.subtype} ${I.args.map(oe=>F(oe)).join(" ")}`}c(O,"stringifyRedirectArgument"),n(O,"stringifyRedirectArgument");function F(I){return I.segments.map(oe=>fe(oe)).join("")}c(F,"stringifyValueArgument"),n(F,"stringifyValueArgument");const $=new Map([["\f","\\f"],[`
|
|
8
|
+
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),v=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from($,([I,oe])=>[I,`"$'${oe}'"`])]),C=n(I=>$.get(I)??`\\x${I.charCodeAt(0).toString(16).padStart(2,"0")}`,"getEscapedControlChar"),z=n(I=>v.get(I)??`"$'${C(I)}'"`,"getEscapedDblChar");function fe(I){const oe=n((q,se)=>se?`"${q}"`:q,"doubleQuoteIfRequested"),pe=n(q=>q===""?"''":q.match(/[()}<>$|&;"'\n\t ]/)?q.match(/['\t\p{C}]/u)?q.match(/'/)?`"${q.replace(/["$\t\p{C}]/u,z)}"`:`$'${q.replace(/[\t\p{C}]/u,C)}'`:`'${q}'`:q,"quoteIfNeeded");switch(I.type){case"text":return pe(I.text);case"glob":return I.pattern;case"shell":return oe(`$(${S(I.shell)})`,I.quoted);case"variable":return oe(typeof I.defaultValue>"u"?typeof I.alternativeValue>"u"?`\${${I.name}}`:I.alternativeValue.length===0?`\${${I.name}:+}`:`\${${I.name}:+${I.alternativeValue.map(q=>F(q)).join(" ")}}`:I.defaultValue.length===0?`\${${I.name}:-}`:`\${${I.name}:-${I.defaultValue.map(q=>F(q)).join(" ")}}`,I.quoted);case"arithmetic":return`$(( ${ve(I.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${I.type}"`)}}c(fe,"stringifyArgumentSegment"),n(fe,"stringifyArgumentSegment");function ve(I){const oe=n(se=>{switch(se){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${se}"`)}},"getOperator"),pe=n((se,Oe)=>Oe?`( ${se} )`:se,"parenthesizeIfRequested"),q=n(se=>pe(ve(se),!["number","variable"].includes(se.type)),"stringifyAndParenthesizeIfNeeded");switch(I.type){case"number":return String(I.value);case"variable":return I.name;default:return`${q(I.left)} ${oe(I.type)} ${q(I.right)}`}}return c(ve,"stringifyArithmeticExpression"),n(ve,"stringifyArithmeticExpression"),Le}c(Ma,"requireShell");var Ar={},Rn,zi;function Da(){if(zi)return Rn;zi=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"c");function h(a,m){function e(){this.constructor=a}c(e,"t"),n(e,"ctor"),e.prototype=m.prototype,a.prototype=new e}c(h,"peg$subclass"),n(h,"peg$subclass");function y(a,m,e,A){this.message=a,this.expected=m,this.found=e,this.location=A,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),h(y,Error),y.buildMessage=function(a,m){var e={literal:n(function($){return'"'+x($.text)+'"'},"literal"),class:n(function($){var v="",C;for(C=0;C<$.parts.length;C++)v+=$.parts[C]instanceof Array?b($.parts[C][0])+"-"+b($.parts[C][1]):b($.parts[C]);return"["+($.inverted?"^":"")+v+"]"},"class"),any:n(function($){return"any character"},"any"),end:n(function($){return"end of input"},"end"),other:n(function($){return $.description},"other")};function A($){return $.charCodeAt(0).toString(16).toUpperCase()}c(A,"h"),n(A,"hex");function x($){return $.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(x,"m"),n(x,"literalEscape");function b($){return $.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(b,"x"),n(b,"classEscape");function E($){return e[$.type]($)}c(E,"A"),n(E,"describeExpectation");function O($){var v=new Array($.length),C,z;for(C=0;C<$.length;C++)v[C]=E($[C]);if(v.sort(),v.length>0){for(C=1,z=1;C<v.length;C++)v[C-1]!==v[C]&&(v[z]=v[C],z++);v.length=z}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"C"),n(O,"describeExpected");function F($){return $?'"'+x($)+'"':"end of input"}return c(F,"b"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(m)+" found."};function S(a,m){m=m!==void 0?m:{};var e={},A={resolution:ye},x=ye,b="/",E=He("/",!1),O=n(function(B,W){return{from:B,descriptor:W}},"peg$c2"),F=n(function(B){return{descriptor:B}},"peg$c3"),$="@",v=He("@",!1),C=n(function(B,W){return{fullName:B,description:W}},"peg$c6"),z=n(function(B){return{fullName:B}},"peg$c7"),fe=n(function(){return De()},"peg$c8"),ve=/^[^\/@]/,I=Ke(["/","@"],!0,!1),oe=/^[^\/]/,pe=Ke(["/"],!0,!1),q=0,se=0,Oe=[{line:1,column:1}],Ae=0,Ne=[],Me;if("startRule"in m){if(!(m.startRule in A))throw new Error(`Can't start parsing from rule "`+m.startRule+'".');x=A[m.startRule]}function De(){return a.substring(se,q)}c(De,"U"),n(De,"text");function qe(){return we(se,q)}c(qe,"J"),n(qe,"location");function rt(B,W){throw W=W!==void 0?W:we(se,q),Re([Fe(B)],a.substring(se,q),W)}c(rt,"K"),n(rt,"expected");function Se(B,W){throw W=W!==void 0?W:we(se,q),Ce(B,W)}c(Se,"Q"),n(Se,"error");function He(B,W){return{type:"literal",text:B,ignoreCase:W}}c(He,"j"),n(He,"peg$literalExpectation");function Ke(B,W,ae){return{type:"class",parts:B,inverted:W,ignoreCase:ae}}c(Ke,"k"),n(Ke,"peg$classExpectation");function Qe(){return{type:"any"}}c(Qe,"V"),n(Qe,"peg$anyExpectation");function re(){return{type:"end"}}c(re,"X"),n(re,"peg$endExpectation");function Fe(B){return{type:"other",description:B}}c(Fe,"q"),n(Fe,"peg$otherExpectation");function We(B){var W=Oe[B],ae;if(W)return W;for(ae=B-1;!Oe[ae];)ae--;for(W=Oe[ae],W={line:W.line,column:W.column};ae<B;)a.charCodeAt(ae)===10?(W.line++,W.column=1):W.column++,ae++;return Oe[B]=W,W}c(We,"L"),n(We,"peg$computePosDetails");function we(B,W){var ae=We(B),be=We(W);return{start:{offset:B,line:ae.line,column:ae.column},end:{offset:W,line:be.line,column:be.column}}}c(we,"y"),n(we,"peg$computeLocation");function ke(B){q<Ae||(q>Ae&&(Ae=q,Ne=[]),Ne.push(B))}c(ke,"$"),n(ke,"peg$fail");function Ce(B,W){return new y(B,null,null,W)}c(Ce,"z"),n(Ce,"peg$buildSimpleError");function Re(B,W,ae){return new y(y.buildMessage(B,W),B,W,ae)}c(Re,"M"),n(Re,"peg$buildStructuredError");function ye(){var B,W,ae,be;return B=q,W=Ye(),W!==e?(a.charCodeAt(q)===47?(ae=b,q++):(ae=e,ke(E)),ae!==e?(be=Ye(),be!==e?(se=B,W=O(W,be),B=W):(q=B,B=e)):(q=B,B=e)):(q=B,B=e),B===e&&(B=q,W=Ye(),W!==e&&(se=B,W=F(W)),B=W),B}c(ye,"_"),n(ye,"peg$parseresolution");function Ye(){var B,W,ae,be;return B=q,W=Ue(),W!==e?(a.charCodeAt(q)===64?(ae=$,q++):(ae=e,ke(v)),ae!==e?(be=Je(),be!==e?(se=B,W=C(W,be),B=W):(q=B,B=e)):(q=B,B=e)):(q=B,B=e),B===e&&(B=q,W=Ue(),W!==e&&(se=B,W=z(W)),B=W),B}c(Ye,"R"),n(Ye,"peg$parsespecifier");function Ue(){var B,W,ae,be,nt;return B=q,a.charCodeAt(q)===64?(W=$,q++):(W=e,ke(v)),W!==e?(ae=Ve(),ae!==e?(a.charCodeAt(q)===47?(be=b,q++):(be=e,ke(E)),be!==e?(nt=Ve(),nt!==e?(se=B,W=fe(),B=W):(q=B,B=e)):(q=B,B=e)):(q=B,B=e)):(q=B,B=e),B===e&&(B=q,W=Ve(),W!==e&&(se=B,W=fe()),B=W),B}c(Ue,"B"),n(Ue,"peg$parsefullName");function Ve(){var B,W,ae;if(B=q,W=[],ve.test(a.charAt(q))?(ae=a.charAt(q),q++):(ae=e,ke(I)),ae!==e)for(;ae!==e;)W.push(ae),ve.test(a.charAt(q))?(ae=a.charAt(q),q++):(ae=e,ke(I));else W=e;return W!==e&&(se=B,W=fe()),B=W,B}c(Ve,"D"),n(Ve,"peg$parseident");function Je(){var B,W,ae;if(B=q,W=[],oe.test(a.charAt(q))?(ae=a.charAt(q),q++):(ae=e,ke(pe)),ae!==e)for(;ae!==e;)W.push(ae),oe.test(a.charAt(q))?(ae=a.charAt(q),q++):(ae=e,ke(pe));else W=e;return W!==e&&(se=B,W=fe()),B=W,B}if(c(Je,"G"),n(Je,"peg$parsedescription"),Me=x(),Me!==e&&q===a.length)return Me;throw Me!==e&&q<a.length&&ke(re()),Re(Ne,Ae<a.length?a.charAt(Ae):null,Ae<a.length?we(Ae,Ae+1):we(Ae,Ae))}return c(S,"peg$parse"),n(S,"peg$parse"),Rn={SyntaxError:y,parse:S},Rn}c(Da,"requireResolution$1");var Zi;function qa(){if(Zi)return Ar;Zi=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"o");Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.parseResolution=y,Ar.stringifyResolution=S;const h=Da();function y(a){const m=a.match(/^\*{1,2}\/(.*)/);if(m)throw new Error(`The override for '${a}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${m[1]}' instead.`);try{return(0,h.parse)(a)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}c(y,"parseResolution"),n(y,"parseResolution");function S(a){let m="";return a.from&&(m+=a.from.fullName,a.from.description&&(m+=`@${a.from.description}`),m+="/"),m+=a.descriptor.fullName,a.descriptor.description&&(m+=`@${a.descriptor.description}`),m}return c(S,"stringifyResolution"),n(S,"stringifyResolution"),Ar}c(qa,"requireResolution");var Yt={},xe={},Qt={},Lt={},Xi;function Xt(){if(Xi)return Lt;Xi=1;var g=Object.defineProperty,n=c((A,x)=>g(A,"name",{value:x,configurable:!0}),"o");function h(A){return typeof A>"u"||A===null}c(h,"isNothing"),n(h,"isNothing");function y(A){return typeof A=="object"&&A!==null}c(y,"isObject"),n(y,"isObject");function S(A){return Array.isArray(A)?A:h(A)?[]:[A]}c(S,"toArray"),n(S,"toArray");function a(A,x){var b,E,O,F;if(x)for(F=Object.keys(x),b=0,E=F.length;b<E;b+=1)O=F[b],A[O]=x[O];return A}c(a,"extend"),n(a,"extend");function m(A,x){var b="",E;for(E=0;E<x;E+=1)b+=A;return b}c(m,"repeat"),n(m,"repeat");function e(A){return A===0&&Number.NEGATIVE_INFINITY===1/A}return c(e,"isNegativeZero"),n(e,"isNegativeZero"),Lt.isNothing=h,Lt.isObject=y,Lt.toArray=S,Lt.repeat=m,Lt.isNegativeZero=e,Lt.extend=a,Lt}c(Xt,"requireCommon");var Ln,eo;function Sr(){if(eo)return Ln;eo=1;var g=Object.defineProperty,n=c((y,S)=>g(y,"name",{value:S,configurable:!0}),"s");function h(y,S){Error.call(this),this.name="YAMLException",this.reason=y,this.mark=S,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return c(h,"YAMLException"),n(h,"YAMLException"),h.prototype=Object.create(Error.prototype),h.prototype.constructor=h,h.prototype.toString=n(function(y){var S=this.name+": ";return S+=this.reason||"(unknown reason)",!y&&this.mark&&(S+=" "+this.mark.toString()),S},"toString"),Ln=h,Ln}c(Sr,"requireException");var Fn,to;function Ya(){if(to)return Fn;to=1;var g=Object.defineProperty,n=c((S,a)=>g(S,"name",{value:a,configurable:!0}),"o"),h=Xt();function y(S,a,m,e,A){this.name=S,this.buffer=a,this.position=m,this.line=e,this.column=A}return c(y,"Mark"),n(y,"Mark"),y.prototype.getSnippet=n(function(S,a){var m,e,A,x,b;if(!this.buffer)return null;for(S=S||4,a=a||75,m="",e=this.position;e>0&&`\0\r
|
|
9
|
+
\u2028\u2029`.indexOf(this.buffer.charAt(e-1))===-1;)if(e-=1,this.position-e>a/2-1){m=" ... ",e+=5;break}for(A="",x=this.position;x<this.buffer.length&&`\0\r
|
|
10
|
+
\u2028\u2029`.indexOf(this.buffer.charAt(x))===-1;)if(x+=1,x-this.position>a/2-1){A=" ... ",x-=5;break}return b=this.buffer.slice(e,x),h.repeat(" ",S)+m+b+A+`
|
|
11
|
+
`+h.repeat(" ",S+this.position-e+m.length)+"^"},"getSnippet"),y.prototype.toString=n(function(S){var a,m="";return this.name&&(m+='in "'+this.name+'" '),m+="at line "+(this.line+1)+", column "+(this.column+1),S||(a=this.getSnippet(),a&&(m+=`:
|
|
12
|
+
`+a)),m},"toString"),Fn=y,Fn}c(Ya,"requireMark");var Pn,ro;function Ie(){if(ro)return Pn;ro=1;var g=Object.defineProperty,n=c((e,A)=>g(e,"name",{value:A,configurable:!0}),"i"),h=Sr(),y=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],S=["scalar","sequence","mapping"];function a(e){var A={};return e!==null&&Object.keys(e).forEach(function(x){e[x].forEach(function(b){A[String(b)]=x})}),A}c(a,"compileStyleAliases"),n(a,"compileStyleAliases");function m(e,A){if(A=A||{},Object.keys(A).forEach(function(x){if(y.indexOf(x)===-1)throw new h('Unknown option "'+x+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=A.kind||null,this.resolve=A.resolve||function(){return!0},this.construct=A.construct||function(x){return x},this.instanceOf=A.instanceOf||null,this.predicate=A.predicate||null,this.represent=A.represent||null,this.defaultStyle=A.defaultStyle||null,this.styleAliases=a(A.styleAliases||null),S.indexOf(this.kind)===-1)throw new h('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}return c(m,"Type"),n(m,"Type"),Pn=m,Pn}c(Ie,"requireType");var In,no;function er(){if(no)return In;no=1;var g=Object.defineProperty,n=c((A,x)=>g(A,"name",{value:x,configurable:!0}),"a"),h=Xt(),y=Sr(),S=Ie();function a(A,x,b){var E=[];return A.include.forEach(function(O){b=a(O,x,b)}),A[x].forEach(function(O){b.forEach(function(F,$){F.tag===O.tag&&F.kind===O.kind&&E.push($)}),b.push(O)}),b.filter(function(O,F){return E.indexOf(F)===-1})}c(a,"compileList"),n(a,"compileList");function m(){var A={scalar:{},sequence:{},mapping:{},fallback:{}},x,b;function E(O){A[O.kind][O.tag]=A.fallback[O.tag]=O}for(c(E,"n"),n(E,"collectType"),x=0,b=arguments.length;x<b;x+=1)arguments[x].forEach(E);return A}c(m,"compileMap"),n(m,"compileMap");function e(A){this.include=A.include||[],this.implicit=A.implicit||[],this.explicit=A.explicit||[],this.implicit.forEach(function(x){if(x.loadKind&&x.loadKind!=="scalar")throw new y("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=m(this.compiledImplicit,this.compiledExplicit)}return c(e,"Schema"),n(e,"Schema"),e.DEFAULT=null,e.create=n(function(){var A,x;switch(arguments.length){case 1:A=e.DEFAULT,x=arguments[0];break;case 2:A=arguments[0],x=arguments[1];break;default:throw new y("Wrong number of arguments for Schema.create function")}if(A=h.toArray(A),x=h.toArray(x),!A.every(function(b){return b instanceof e}))throw new y("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!x.every(function(b){return b instanceof S}))throw new y("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new e({include:A,explicit:x})},"createSchema"),In=e,In}c(er,"requireSchema");var Nn,io;function Ba(){if(io)return Nn;io=1;var g=Object.defineProperty,n=c((y,S)=>g(y,"name",{value:S,configurable:!0}),"e"),h=Ie();return Nn=new h("tag:yaml.org,2002:str",{kind:"scalar",construct:n(function(y){return y!==null?y:""},"construct")}),Nn}c(Ba,"requireStr");var Mn,oo;function Ha(){if(oo)return Mn;oo=1;var g=Object.defineProperty,n=c((y,S)=>g(y,"name",{value:S,configurable:!0}),"r"),h=Ie();return Mn=new h("tag:yaml.org,2002:seq",{kind:"sequence",construct:n(function(y){return y!==null?y:[]},"construct")}),Mn}c(Ha,"requireSeq");var Dn,ao;function Ua(){if(ao)return Dn;ao=1;var g=Object.defineProperty,n=c((y,S)=>g(y,"name",{value:S,configurable:!0}),"r"),h=Ie();return Dn=new h("tag:yaml.org,2002:map",{kind:"mapping",construct:n(function(y){return y!==null?y:{}},"construct")}),Dn}c(Ua,"requireMap");var qn,so;function si(){if(so)return qn;so=1;var g=er();return qn=new g({explicit:[Ba(),Ha(),Ua()]}),qn}c(si,"requireFailsafe");var Yn,uo;function Wa(){if(uo)return Yn;uo=1;var g=Object.defineProperty,n=c((m,e)=>g(m,"name",{value:e,configurable:!0}),"l"),h=Ie();function y(m){if(m===null)return!0;var e=m.length;return e===1&&m==="~"||e===4&&(m==="null"||m==="Null"||m==="NULL")}c(y,"resolveYamlNull"),n(y,"resolveYamlNull");function S(){return null}c(S,"constructYamlNull"),n(S,"constructYamlNull");function a(m){return m===null}return c(a,"isNull"),n(a,"isNull"),Yn=new h("tag:yaml.org,2002:null",{kind:"scalar",resolve:y,construct:S,predicate:a,represent:{canonical:n(function(){return"~"},"canonical"),lowercase:n(function(){return"null"},"lowercase"),uppercase:n(function(){return"NULL"},"uppercase"),camelcase:n(function(){return"Null"},"camelcase")},defaultStyle:"lowercase"}),Yn}c(Wa,"require_null");var Bn,co;function Va(){if(co)return Bn;co=1;var g=Object.defineProperty,n=c((m,e)=>g(m,"name",{value:e,configurable:!0}),"r"),h=Ie();function y(m){if(m===null)return!1;var e=m.length;return e===4&&(m==="true"||m==="True"||m==="TRUE")||e===5&&(m==="false"||m==="False"||m==="FALSE")}c(y,"resolveYamlBoolean"),n(y,"resolveYamlBoolean");function S(m){return m==="true"||m==="True"||m==="TRUE"}c(S,"constructYamlBoolean"),n(S,"constructYamlBoolean");function a(m){return Object.prototype.toString.call(m)==="[object Boolean]"}return c(a,"isBoolean"),n(a,"isBoolean"),Bn=new h("tag:yaml.org,2002:bool",{kind:"scalar",resolve:y,construct:S,predicate:a,represent:{lowercase:n(function(m){return m?"true":"false"},"lowercase"),uppercase:n(function(m){return m?"TRUE":"FALSE"},"uppercase"),camelcase:n(function(m){return m?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Bn}c(Va,"requireBool");var Hn,lo;function Ja(){if(lo)return Hn;lo=1;var g=Object.defineProperty,n=c((b,E)=>g(b,"name",{value:E,configurable:!0}),"u"),h=Xt(),y=Ie();function S(b){return 48<=b&&b<=57||65<=b&&b<=70||97<=b&&b<=102}c(S,"isHexCode"),n(S,"isHexCode");function a(b){return 48<=b&&b<=55}c(a,"isOctCode"),n(a,"isOctCode");function m(b){return 48<=b&&b<=57}c(m,"isDecCode"),n(m,"isDecCode");function e(b){if(b===null)return!1;var E=b.length,O=0,F=!1,$;if(!E)return!1;if($=b[O],($==="-"||$==="+")&&($=b[++O]),$==="0"){if(O+1===E)return!0;if($=b[++O],$==="b"){for(O++;O<E;O++)if($=b[O],$!=="_"){if($!=="0"&&$!=="1")return!1;F=!0}return F&&$!=="_"}if($==="x"){for(O++;O<E;O++)if($=b[O],$!=="_"){if(!S(b.charCodeAt(O)))return!1;F=!0}return F&&$!=="_"}for(;O<E;O++)if($=b[O],$!=="_"){if(!a(b.charCodeAt(O)))return!1;F=!0}return F&&$!=="_"}if($==="_")return!1;for(;O<E;O++)if($=b[O],$!=="_"){if($===":")break;if(!m(b.charCodeAt(O)))return!1;F=!0}return!F||$==="_"?!1:$!==":"?!0:/^(:[0-5]?[0-9])+$/.test(b.slice(O))}c(e,"resolveYamlInteger"),n(e,"resolveYamlInteger");function A(b){var E=b,O=1,F,$,v=[];return E.indexOf("_")!==-1&&(E=E.replace(/_/g,"")),F=E[0],(F==="-"||F==="+")&&(F==="-"&&(O=-1),E=E.slice(1),F=E[0]),E==="0"?0:F==="0"?E[1]==="b"?O*parseInt(E.slice(2),2):E[1]==="x"?O*parseInt(E,16):O*parseInt(E,8):E.indexOf(":")!==-1?(E.split(":").forEach(function(C){v.unshift(parseInt(C,10))}),E=0,$=1,v.forEach(function(C){E+=C*$,$*=60}),O*E):O*parseInt(E,10)}c(A,"constructYamlInteger"),n(A,"constructYamlInteger");function x(b){return Object.prototype.toString.call(b)==="[object Number]"&&b%1===0&&!h.isNegativeZero(b)}return c(x,"isInteger"),n(x,"isInteger"),Hn=new y("tag:yaml.org,2002:int",{kind:"scalar",resolve:e,construct:A,predicate:x,represent:{binary:n(function(b){return b>=0?"0b"+b.toString(2):"-0b"+b.toString(2).slice(1)},"binary"),octal:n(function(b){return b>=0?"0"+b.toString(8):"-0"+b.toString(8).slice(1)},"octal"),decimal:n(function(b){return b.toString(10)},"decimal"),hexadecimal:n(function(b){return b>=0?"0x"+b.toString(16).toUpperCase():"-0x"+b.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Hn}c(Ja,"requireInt");var Un,fo;function Ga(){if(fo)return Un;fo=1;var g=Object.defineProperty,n=c((b,E)=>g(b,"name",{value:E,configurable:!0}),"a"),h=Xt(),y=Ie(),S=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(b){return!(b===null||!S.test(b)||b[b.length-1]==="_")}c(a,"resolveYamlFloat"),n(a,"resolveYamlFloat");function m(b){var E,O,F,$;return E=b.replace(/_/g,"").toLowerCase(),O=E[0]==="-"?-1:1,$=[],"+-".indexOf(E[0])>=0&&(E=E.slice(1)),E===".inf"?O===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:E===".nan"?NaN:E.indexOf(":")>=0?(E.split(":").forEach(function(v){$.unshift(parseFloat(v,10))}),E=0,F=1,$.forEach(function(v){E+=v*F,F*=60}),O*E):O*parseFloat(E,10)}c(m,"constructYamlFloat"),n(m,"constructYamlFloat");var e=/^[-+]?[0-9]+e/;function A(b,E){var O;if(isNaN(b))switch(E){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===b)switch(E){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===b)switch(E){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h.isNegativeZero(b))return"-0.0";return O=b.toString(10),e.test(O)?O.replace("e",".e"):O}c(A,"representYamlFloat"),n(A,"representYamlFloat");function x(b){return Object.prototype.toString.call(b)==="[object Number]"&&(b%1!==0||h.isNegativeZero(b))}return c(x,"isFloat"),n(x,"isFloat"),Un=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:m,predicate:x,represent:A,defaultStyle:"lowercase"}),Un}c(Ga,"requireFloat");var Wn,po;function qo(){if(po)return Wn;po=1;var g=er();return Wn=new g({include:[si()],implicit:[Wa(),Va(),Ja(),Ga()]}),Wn}c(qo,"requireJson");var Vn,ho;function Yo(){if(ho)return Vn;ho=1;var g=er();return Vn=new g({include:[qo()]}),Vn}c(Yo,"requireCore");var Jn,go;function Ka(){if(go)return Jn;go=1;var g=Object.defineProperty,n=c((A,x)=>g(A,"name",{value:x,configurable:!0}),"l"),h=Ie(),y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),S=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function a(A){return A===null?!1:y.exec(A)!==null||S.exec(A)!==null}c(a,"resolveYamlTimestamp"),n(a,"resolveYamlTimestamp");function m(A){var x,b,E,O,F,$,v,C=0,z=null,fe,ve,I;if(x=y.exec(A),x===null&&(x=S.exec(A)),x===null)throw new Error("Date resolve error");if(b=+x[1],E=+x[2]-1,O=+x[3],!x[4])return new Date(Date.UTC(b,E,O));if(F=+x[4],$=+x[5],v=+x[6],x[7]){for(C=x[7].slice(0,3);C.length<3;)C+="0";C=+C}return x[9]&&(fe=+x[10],ve=+(x[11]||0),z=(fe*60+ve)*6e4,x[9]==="-"&&(z=-z)),I=new Date(Date.UTC(b,E,O,F,$,v,C)),z&&I.setTime(I.getTime()-z),I}c(m,"constructYamlTimestamp"),n(m,"constructYamlTimestamp");function e(A){return A.toISOString()}return c(e,"representYamlTimestamp"),n(e,"representYamlTimestamp"),Jn=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:a,construct:m,instanceOf:Date,represent:e}),Jn}c(Ka,"requireTimestamp");var Gn,mo;function Qa(){if(mo)return Gn;mo=1;var g=Object.defineProperty,n=c((S,a)=>g(S,"name",{value:a,configurable:!0}),"r"),h=Ie();function y(S){return S==="<<"||S===null}return c(y,"resolveYamlMerge"),n(y,"resolveYamlMerge"),Gn=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:y}),Gn}c(Qa,"requireMerge");function Bo(g){throw new Error('Could not dynamically require "'+g+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}c(Bo,"commonjsRequire");var Kn,yo;function za(){if(yo)return Kn;yo=1;var g=Object.defineProperty,n=c((b,E)=>g(b,"name",{value:E,configurable:!0}),"x"),h;try{var y=Bo;h=y("buffer").Buffer}catch{}var S=Ie(),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
13
|
+
\r`;function m(b){if(b===null)return!1;var E,O,F=0,$=b.length,v=a;for(O=0;O<$;O++)if(E=v.indexOf(b.charAt(O)),!(E>64)){if(E<0)return!1;F+=6}return F%8===0}c(m,"resolveYamlBinary"),n(m,"resolveYamlBinary");function e(b){var E,O,F=b.replace(/[\r\n=]/g,""),$=F.length,v=a,C=0,z=[];for(E=0;E<$;E++)E%4===0&&E&&(z.push(C>>16&255),z.push(C>>8&255),z.push(C&255)),C=C<<6|v.indexOf(F.charAt(E));return O=$%4*6,O===0?(z.push(C>>16&255),z.push(C>>8&255),z.push(C&255)):O===18?(z.push(C>>10&255),z.push(C>>2&255)):O===12&&z.push(C>>4&255),h?h.from?h.from(z):new h(z):z}c(e,"constructYamlBinary"),n(e,"constructYamlBinary");function A(b){var E="",O=0,F,$,v=b.length,C=a;for(F=0;F<v;F++)F%3===0&&F&&(E+=C[O>>18&63],E+=C[O>>12&63],E+=C[O>>6&63],E+=C[O&63]),O=(O<<8)+b[F];return $=v%3,$===0?(E+=C[O>>18&63],E+=C[O>>12&63],E+=C[O>>6&63],E+=C[O&63]):$===2?(E+=C[O>>10&63],E+=C[O>>4&63],E+=C[O<<2&63],E+=C[64]):$===1&&(E+=C[O>>2&63],E+=C[O<<4&63],E+=C[64],E+=C[64]),E}c(A,"representYamlBinary"),n(A,"representYamlBinary");function x(b){return h&&h.isBuffer(b)}return c(x,"isBinary"),n(x,"isBinary"),Kn=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:m,construct:e,predicate:x,represent:A}),Kn}c(za,"requireBinary");var Qn,vo;function Za(){if(vo)return Qn;vo=1;var g=Object.defineProperty,n=c((e,A)=>g(e,"name",{value:A,configurable:!0}),"u"),h=Ie(),y=Object.prototype.hasOwnProperty,S=Object.prototype.toString;function a(e){if(e===null)return!0;var A=[],x,b,E,O,F,$=e;for(x=0,b=$.length;x<b;x+=1){if(E=$[x],F=!1,S.call(E)!=="[object Object]")return!1;for(O in E)if(y.call(E,O))if(!F)F=!0;else return!1;if(!F)return!1;if(A.indexOf(O)===-1)A.push(O);else return!1}return!0}c(a,"resolveYamlOmap"),n(a,"resolveYamlOmap");function m(e){return e!==null?e:[]}return c(m,"constructYamlOmap"),n(m,"constructYamlOmap"),Qn=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a,construct:m}),Qn}c(Za,"requireOmap");var zn,Ao;function Xa(){if(Ao)return zn;Ao=1;var g=Object.defineProperty,n=c((m,e)=>g(m,"name",{value:e,configurable:!0}),"i"),h=Ie(),y=Object.prototype.toString;function S(m){if(m===null)return!0;var e,A,x,b,E,O=m;for(E=new Array(O.length),e=0,A=O.length;e<A;e+=1){if(x=O[e],y.call(x)!=="[object Object]"||(b=Object.keys(x),b.length!==1))return!1;E[e]=[b[0],x[b[0]]]}return!0}c(S,"resolveYamlPairs"),n(S,"resolveYamlPairs");function a(m){if(m===null)return[];var e,A,x,b,E,O=m;for(E=new Array(O.length),e=0,A=O.length;e<A;e+=1)x=O[e],b=Object.keys(x),E[e]=[b[0],x[b[0]]];return E}return c(a,"constructYamlPairs"),n(a,"constructYamlPairs"),zn=new h("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:S,construct:a}),zn}c(Xa,"requirePairs");var Zn,bo;function es(){if(bo)return Zn;bo=1;var g=Object.defineProperty,n=c((m,e)=>g(m,"name",{value:e,configurable:!0}),"n"),h=Ie(),y=Object.prototype.hasOwnProperty;function S(m){if(m===null)return!0;var e,A=m;for(e in A)if(y.call(A,e)&&A[e]!==null)return!1;return!0}c(S,"resolveYamlSet"),n(S,"resolveYamlSet");function a(m){return m!==null?m:{}}return c(a,"constructYamlSet"),n(a,"constructYamlSet"),Zn=new h("tag:yaml.org,2002:set",{kind:"mapping",resolve:S,construct:a}),Zn}c(es,"requireSet");var Xn,Co;function Cr(){if(Co)return Xn;Co=1;var g=er();return Xn=new g({include:[Yo()],implicit:[Ka(),Qa()],explicit:[za(),Za(),Xa(),es()]}),Xn}c(Cr,"requireDefault_safe");var ei,$o;function ts(){if($o)return ei;$o=1;var g=Object.defineProperty,n=c((e,A)=>g(e,"name",{value:A,configurable:!0}),"e"),h=Ie();function y(){return!0}c(y,"resolveJavascriptUndefined"),n(y,"resolveJavascriptUndefined");function S(){}c(S,"constructJavascriptUndefined"),n(S,"constructJavascriptUndefined");function a(){return""}c(a,"representJavascriptUndefined"),n(a,"representJavascriptUndefined");function m(e){return typeof e>"u"}return c(m,"isUndefined"),n(m,"isUndefined"),ei=new h("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:y,construct:S,predicate:m,represent:a}),ei}c(ts,"require_undefined");var ti,So;function rs(){if(So)return ti;So=1;var g=Object.defineProperty,n=c((e,A)=>g(e,"name",{value:A,configurable:!0}),"n"),h=Ie();function y(e){if(e===null||e.length===0)return!1;var A=e,x=/\/([gim]*)$/.exec(e),b="";return!(A[0]==="/"&&(x&&(b=x[1]),b.length>3||A[A.length-b.length-1]!=="/"))}c(y,"resolveJavascriptRegExp"),n(y,"resolveJavascriptRegExp");function S(e){var A=e,x=/\/([gim]*)$/.exec(e),b="";return A[0]==="/"&&(x&&(b=x[1]),A=A.slice(1,A.length-b.length-1)),new RegExp(A,b)}c(S,"constructJavascriptRegExp"),n(S,"constructJavascriptRegExp");function a(e){var A="/"+e.source+"/";return e.global&&(A+="g"),e.multiline&&(A+="m"),e.ignoreCase&&(A+="i"),A}c(a,"representJavascriptRegExp"),n(a,"representJavascriptRegExp");function m(e){return Object.prototype.toString.call(e)==="[object RegExp]"}return c(m,"isRegExp"),n(m,"isRegExp"),ti=new h("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:y,construct:S,predicate:m,represent:a}),ti}c(rs,"requireRegexp");var ri,Eo;function ns(){if(Eo)return ri;Eo=1;var g=Object.defineProperty,n=c((x,b)=>g(x,"name",{value:b,configurable:!0}),"o"),h;try{var y=Bo;h=y("esprima")}catch{typeof window<"u"&&(h=window.esprima)}var S=Ie();function a(x){if(x===null)return!1;try{var b="("+x+")",E=h.parse(b,{range:!0});return!(E.type!=="Program"||E.body.length!==1||E.body[0].type!=="ExpressionStatement"||E.body[0].expression.type!=="ArrowFunctionExpression"&&E.body[0].expression.type!=="FunctionExpression")}catch{return!1}}c(a,"resolveJavascriptFunction"),n(a,"resolveJavascriptFunction");function m(x){var b="("+x+")",E=h.parse(b,{range:!0}),O=[],F;if(E.type!=="Program"||E.body.length!==1||E.body[0].type!=="ExpressionStatement"||E.body[0].expression.type!=="ArrowFunctionExpression"&&E.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return E.body[0].expression.params.forEach(function($){O.push($.name)}),F=E.body[0].expression.body.range,E.body[0].expression.body.type==="BlockStatement"?new Function(O,b.slice(F[0]+1,F[1]-1)):new Function(O,"return "+b.slice(F[0],F[1]))}c(m,"constructJavascriptFunction"),n(m,"constructJavascriptFunction");function e(x){return x.toString()}c(e,"representJavascriptFunction"),n(e,"representJavascriptFunction");function A(x){return Object.prototype.toString.call(x)==="[object Function]"}return c(A,"isFunction"),n(A,"isFunction"),ri=new S("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:a,construct:m,predicate:A,represent:e}),ri}c(ns,"require_function");var ni,wo;function Gr(){if(wo)return ni;wo=1;var g=er();return ni=g.DEFAULT=new g({include:[Cr()],explicit:[ts(),rs(),ns()]}),ni}c(Gr,"requireDefault_full");var ko;function is(){if(ko)return Qt;ko=1;var g=Object.defineProperty,n=c((r,_)=>g(r,"name",{value:_,configurable:!0}),"x"),h=Xt(),y=Sr(),S=Ya(),a=Cr(),m=Gr(),e=Object.prototype.hasOwnProperty,A=1,x=2,b=3,E=4,O=1,F=2,$=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=/[\x85\u2028\u2029]/,z=/[,\[\]\{\}]/,fe=/^(?:!|!!|![a-z\-]+!)$/i,ve=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function I(r){return Object.prototype.toString.call(r)}c(I,"_class"),n(I,"_class");function oe(r){return r===10||r===13}c(oe,"is_EOL"),n(oe,"is_EOL");function pe(r){return r===9||r===32}c(pe,"is_WHITE_SPACE"),n(pe,"is_WHITE_SPACE");function q(r){return r===9||r===32||r===10||r===13}c(q,"is_WS_OR_EOL"),n(q,"is_WS_OR_EOL");function se(r){return r===44||r===91||r===93||r===123||r===125}c(se,"is_FLOW_INDICATOR"),n(se,"is_FLOW_INDICATOR");function Oe(r){var _;return 48<=r&&r<=57?r-48:(_=r|32,97<=_&&_<=102?_-97+10:-1)}c(Oe,"fromHexCode"),n(Oe,"fromHexCode");function Ae(r){return r===120?2:r===117?4:r===85?8:0}c(Ae,"escapedHexLen"),n(Ae,"escapedHexLen");function Ne(r){return 48<=r&&r<=57?r-48:-1}c(Ne,"fromDecimalCode"),n(Ne,"fromDecimalCode");function Me(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
|
|
14
|
+
`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"
":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}c(Me,"simpleEscapeSequence"),n(Me,"simpleEscapeSequence");function De(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}c(De,"charFromCodepoint"),n(De,"charFromCodepoint");function qe(r,_,T){_==="__proto__"?Object.defineProperty(r,_,{configurable:!0,enumerable:!0,writable:!0,value:T}):r[_]=T}c(qe,"setProperty"),n(qe,"setProperty");for(var rt=new Array(256),Se=new Array(256),He=0;He<256;He++)rt[He]=Me(He)?1:0,Se[He]=Me(He);function Ke(r,_){this.input=r,this.filename=_.filename||null,this.schema=_.schema||m,this.onWarning=_.onWarning||null,this.legacy=_.legacy||!1,this.json=_.json||!1,this.listener=_.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}c(Ke,"State"),n(Ke,"State");function Qe(r,_){return new y(_,new S(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}c(Qe,"generateError"),n(Qe,"generateError");function re(r,_){throw Qe(r,_)}c(re,"throwError"),n(re,"throwError");function Fe(r,_){r.onWarning&&r.onWarning.call(null,Qe(r,_))}c(Fe,"throwWarning"),n(Fe,"throwWarning");var We={YAML:n(function(r,_,T){var Z,H,l;r.version!==null&&re(r,"duplication of %YAML directive"),T.length!==1&&re(r,"YAML directive accepts exactly one argument"),Z=/^([0-9]+)\.([0-9]+)$/.exec(T[0]),Z===null&&re(r,"ill-formed argument of the YAML directive"),H=parseInt(Z[1],10),l=parseInt(Z[2],10),H!==1&&re(r,"unacceptable YAML version of the document"),r.version=T[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&Fe(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:n(function(r,_,T){var Z,H;T.length!==2&&re(r,"TAG directive accepts exactly two arguments"),Z=T[0],H=T[1],fe.test(Z)||re(r,"ill-formed tag handle (first argument) of the TAG directive"),e.call(r.tagMap,Z)&&re(r,'there is a previously declared suffix for "'+Z+'" tag handle'),ve.test(H)||re(r,"ill-formed tag prefix (second argument) of the TAG directive"),r.tagMap[Z]=H},"handleTagDirective")};function we(r,_,T,Z){var H,l,w,R;if(_<T){if(R=r.input.slice(_,T),Z)for(H=0,l=R.length;H<l;H+=1)w=R.charCodeAt(H),w===9||32<=w&&w<=1114111||re(r,"expected valid JSON character");else v.test(R)&&re(r,"the stream contains non-printable characters");r.result+=R}}c(we,"captureSegment"),n(we,"captureSegment");function ke(r,_,T,Z){var H,l,w,R;for(h.isObject(T)||re(r,"cannot merge mappings; the provided source object is unacceptable"),H=Object.keys(T),w=0,R=H.length;w<R;w+=1)l=H[w],e.call(_,l)||(qe(_,l,T[l]),Z[l]=!0)}c(ke,"mergeMappings"),n(ke,"mergeMappings");function Ce(r,_,T,Z,H,l,w,R){var L,Y;if(Array.isArray(H))for(H=Array.prototype.slice.call(H),L=0,Y=H.length;L<Y;L+=1)Array.isArray(H[L])&&re(r,"nested arrays are not supported inside keys"),typeof H=="object"&&I(H[L])==="[object Object]"&&(H[L]="[object Object]");if(typeof H=="object"&&I(H)==="[object Object]"&&(H="[object Object]"),H=String(H),_===null&&(_={}),Z==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(L=0,Y=l.length;L<Y;L+=1)ke(r,_,l[L],T);else ke(r,_,l,T);else!r.json&&!e.call(T,H)&&e.call(_,H)&&(r.line=w||r.line,r.position=R||r.position,re(r,"duplicated mapping key")),qe(_,H,l),delete T[H];return _}c(Ce,"storeMappingPair"),n(Ce,"storeMappingPair");function Re(r){var _;_=r.input.charCodeAt(r.position),_===10?r.position++:_===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):re(r,"a line break is expected"),r.line+=1,r.lineStart=r.position}c(Re,"readLineBreak"),n(Re,"readLineBreak");function ye(r,_,T){for(var Z=0,H=r.input.charCodeAt(r.position);H!==0;){for(;pe(H);)H=r.input.charCodeAt(++r.position);if(_&&H===35)do H=r.input.charCodeAt(++r.position);while(H!==10&&H!==13&&H!==0);if(oe(H))for(Re(r),H=r.input.charCodeAt(r.position),Z++,r.lineIndent=0;H===32;)r.lineIndent++,H=r.input.charCodeAt(++r.position);else break}return T!==-1&&Z!==0&&r.lineIndent<T&&Fe(r,"deficient indentation"),Z}c(ye,"skipSeparationSpace"),n(ye,"skipSeparationSpace");function Ye(r){var _=r.position,T;return T=r.input.charCodeAt(_),!!((T===45||T===46)&&T===r.input.charCodeAt(_+1)&&T===r.input.charCodeAt(_+2)&&(_+=3,T=r.input.charCodeAt(_),T===0||q(T)))}c(Ye,"testDocumentSeparator"),n(Ye,"testDocumentSeparator");function Ue(r,_){_===1?r.result+=" ":_>1&&(r.result+=h.repeat(`
|
|
15
|
+
`,_-1))}c(Ue,"writeFoldedLines"),n(Ue,"writeFoldedLines");function Ve(r,_,T){var Z,H,l,w,R,L,Y,V,P=r.kind,X=r.result,J;if(J=r.input.charCodeAt(r.position),q(J)||se(J)||J===35||J===38||J===42||J===33||J===124||J===62||J===39||J===34||J===37||J===64||J===96||(J===63||J===45)&&(H=r.input.charCodeAt(r.position+1),q(H)||T&&se(H)))return!1;for(r.kind="scalar",r.result="",l=w=r.position,R=!1;J!==0;){if(J===58){if(H=r.input.charCodeAt(r.position+1),q(H)||T&&se(H))break}else if(J===35){if(Z=r.input.charCodeAt(r.position-1),q(Z))break}else{if(r.position===r.lineStart&&Ye(r)||T&&se(J))break;if(oe(J))if(L=r.line,Y=r.lineStart,V=r.lineIndent,ye(r,!1,-1),r.lineIndent>=_){R=!0,J=r.input.charCodeAt(r.position);continue}else{r.position=w,r.line=L,r.lineStart=Y,r.lineIndent=V;break}}R&&(we(r,l,w,!1),Ue(r,r.line-L),l=w=r.position,R=!1),pe(J)||(w=r.position+1),J=r.input.charCodeAt(++r.position)}return we(r,l,w,!1),r.result?!0:(r.kind=P,r.result=X,!1)}c(Ve,"readPlainScalar"),n(Ve,"readPlainScalar");function Je(r,_){var T,Z,H;if(T=r.input.charCodeAt(r.position),T!==39)return!1;for(r.kind="scalar",r.result="",r.position++,Z=H=r.position;(T=r.input.charCodeAt(r.position))!==0;)if(T===39)if(we(r,Z,r.position,!0),T=r.input.charCodeAt(++r.position),T===39)Z=r.position,r.position++,H=r.position;else return!0;else oe(T)?(we(r,Z,H,!0),Ue(r,ye(r,!1,_)),Z=H=r.position):r.position===r.lineStart&&Ye(r)?re(r,"unexpected end of the document within a single quoted scalar"):(r.position++,H=r.position);re(r,"unexpected end of the stream within a single quoted scalar")}c(Je,"readSingleQuotedScalar"),n(Je,"readSingleQuotedScalar");function B(r,_){var T,Z,H,l,w,R;if(R=r.input.charCodeAt(r.position),R!==34)return!1;for(r.kind="scalar",r.result="",r.position++,T=Z=r.position;(R=r.input.charCodeAt(r.position))!==0;){if(R===34)return we(r,T,r.position,!0),r.position++,!0;if(R===92){if(we(r,T,r.position,!0),R=r.input.charCodeAt(++r.position),oe(R))ye(r,!1,_);else if(R<256&&rt[R])r.result+=Se[R],r.position++;else if((w=Ae(R))>0){for(H=w,l=0;H>0;H--)R=r.input.charCodeAt(++r.position),(w=Oe(R))>=0?l=(l<<4)+w:re(r,"expected hexadecimal character");r.result+=De(l),r.position++}else re(r,"unknown escape sequence");T=Z=r.position}else oe(R)?(we(r,T,Z,!0),Ue(r,ye(r,!1,_)),T=Z=r.position):r.position===r.lineStart&&Ye(r)?re(r,"unexpected end of the document within a double quoted scalar"):(r.position++,Z=r.position)}re(r,"unexpected end of the stream within a double quoted scalar")}c(B,"readDoubleQuotedScalar"),n(B,"readDoubleQuotedScalar");function W(r,_){var T=!0,Z,H=r.tag,l,w=r.anchor,R,L,Y,V,P,X={},J,ne,me,le;if(le=r.input.charCodeAt(r.position),le===91)L=93,P=!1,l=[];else if(le===123)L=125,P=!0,l={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=l),le=r.input.charCodeAt(++r.position);le!==0;){if(ye(r,!0,_),le=r.input.charCodeAt(r.position),le===L)return r.position++,r.tag=H,r.anchor=w,r.kind=P?"mapping":"sequence",r.result=l,!0;T||re(r,"missed comma between flow collection entries"),ne=J=me=null,Y=V=!1,le===63&&(R=r.input.charCodeAt(r.position+1),q(R)&&(Y=V=!0,r.position++,ye(r,!0,_))),Z=r.line,Ge(r,_,A,!1,!0),ne=r.tag,J=r.result,ye(r,!0,_),le=r.input.charCodeAt(r.position),(V||r.line===Z)&&le===58&&(Y=!0,le=r.input.charCodeAt(++r.position),ye(r,!0,_),Ge(r,_,A,!1,!0),me=r.result),P?Ce(r,l,X,ne,J,me):Y?l.push(Ce(r,null,X,ne,J,me)):l.push(J),ye(r,!0,_),le=r.input.charCodeAt(r.position),le===44?(T=!0,le=r.input.charCodeAt(++r.position)):T=!1}re(r,"unexpected end of the stream within a flow collection")}c(W,"readFlowCollection"),n(W,"readFlowCollection");function ae(r,_){var T,Z,H=O,l=!1,w=!1,R=_,L=0,Y=!1,V,P;if(P=r.input.charCodeAt(r.position),P===124)Z=!1;else if(P===62)Z=!0;else return!1;for(r.kind="scalar",r.result="";P!==0;)if(P=r.input.charCodeAt(++r.position),P===43||P===45)O===H?H=P===43?$:F:re(r,"repeat of a chomping mode identifier");else if((V=Ne(P))>=0)V===0?re(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):w?re(r,"repeat of an indentation width identifier"):(R=_+V-1,w=!0);else break;if(pe(P)){do P=r.input.charCodeAt(++r.position);while(pe(P));if(P===35)do P=r.input.charCodeAt(++r.position);while(!oe(P)&&P!==0)}for(;P!==0;){for(Re(r),r.lineIndent=0,P=r.input.charCodeAt(r.position);(!w||r.lineIndent<R)&&P===32;)r.lineIndent++,P=r.input.charCodeAt(++r.position);if(!w&&r.lineIndent>R&&(R=r.lineIndent),oe(P)){L++;continue}if(r.lineIndent<R){H===$?r.result+=h.repeat(`
|
|
16
|
+
`,l?1+L:L):H===O&&l&&(r.result+=`
|
|
17
|
+
`);break}for(Z?pe(P)?(Y=!0,r.result+=h.repeat(`
|
|
18
|
+
`,l?1+L:L)):Y?(Y=!1,r.result+=h.repeat(`
|
|
19
|
+
`,L+1)):L===0?l&&(r.result+=" "):r.result+=h.repeat(`
|
|
20
|
+
`,L):r.result+=h.repeat(`
|
|
21
|
+
`,l?1+L:L),l=!0,w=!0,L=0,T=r.position;!oe(P)&&P!==0;)P=r.input.charCodeAt(++r.position);we(r,T,r.position,!1)}return!0}c(ae,"readBlockScalar"),n(ae,"readBlockScalar");function be(r,_){var T,Z=r.tag,H=r.anchor,l=[],w,R=!1,L;for(r.anchor!==null&&(r.anchorMap[r.anchor]=l),L=r.input.charCodeAt(r.position);L!==0&&!(L!==45||(w=r.input.charCodeAt(r.position+1),!q(w)));){if(R=!0,r.position++,ye(r,!0,-1)&&r.lineIndent<=_){l.push(null),L=r.input.charCodeAt(r.position);continue}if(T=r.line,Ge(r,_,b,!1,!0),l.push(r.result),ye(r,!0,-1),L=r.input.charCodeAt(r.position),(r.line===T||r.lineIndent>_)&&L!==0)re(r,"bad indentation of a sequence entry");else if(r.lineIndent<_)break}return R?(r.tag=Z,r.anchor=H,r.kind="sequence",r.result=l,!0):!1}c(be,"readBlockSequence"),n(be,"readBlockSequence");function nt(r,_,T){var Z,H,l,w,R=r.tag,L=r.anchor,Y={},V={},P=null,X=null,J=null,ne=!1,me=!1,le;for(r.anchor!==null&&(r.anchorMap[r.anchor]=Y),le=r.input.charCodeAt(r.position);le!==0;){if(Z=r.input.charCodeAt(r.position+1),l=r.line,w=r.position,(le===63||le===58)&&q(Z))le===63?(ne&&(Ce(r,Y,V,P,X,null),P=X=J=null),me=!0,ne=!0,H=!0):ne?(ne=!1,H=!0):re(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,le=Z;else if(Ge(r,T,x,!1,!0))if(r.line===l){for(le=r.input.charCodeAt(r.position);pe(le);)le=r.input.charCodeAt(++r.position);if(le===58)le=r.input.charCodeAt(++r.position),q(le)||re(r,"a whitespace character is expected after the key-value separator within a block mapping"),ne&&(Ce(r,Y,V,P,X,null),P=X=J=null),me=!0,ne=!1,H=!1,P=r.tag,X=r.result;else if(me)re(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=R,r.anchor=L,!0}else if(me)re(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=R,r.anchor=L,!0;else break;if((r.line===l||r.lineIndent>_)&&(Ge(r,_,E,!0,H)&&(ne?X=r.result:J=r.result),ne||(Ce(r,Y,V,P,X,J,l,w),P=X=J=null),ye(r,!0,-1),le=r.input.charCodeAt(r.position)),r.lineIndent>_&&le!==0)re(r,"bad indentation of a mapping entry");else if(r.lineIndent<_)break}return ne&&Ce(r,Y,V,P,X,null),me&&(r.tag=R,r.anchor=L,r.kind="mapping",r.result=Y),me}c(nt,"readBlockMapping"),n(nt,"readBlockMapping");function at(r){var _,T=!1,Z=!1,H,l,w;if(w=r.input.charCodeAt(r.position),w!==33)return!1;if(r.tag!==null&&re(r,"duplication of a tag property"),w=r.input.charCodeAt(++r.position),w===60?(T=!0,w=r.input.charCodeAt(++r.position)):w===33?(Z=!0,H="!!",w=r.input.charCodeAt(++r.position)):H="!",_=r.position,T){do w=r.input.charCodeAt(++r.position);while(w!==0&&w!==62);r.position<r.length?(l=r.input.slice(_,r.position),w=r.input.charCodeAt(++r.position)):re(r,"unexpected end of the stream within a verbatim tag")}else{for(;w!==0&&!q(w);)w===33&&(Z?re(r,"tag suffix cannot contain exclamation marks"):(H=r.input.slice(_-1,r.position+1),fe.test(H)||re(r,"named tag handle cannot contain such characters"),Z=!0,_=r.position+1)),w=r.input.charCodeAt(++r.position);l=r.input.slice(_,r.position),z.test(l)&&re(r,"tag suffix cannot contain flow indicator characters")}return l&&!ve.test(l)&&re(r,"tag name cannot contain such characters: "+l),T?r.tag=l:e.call(r.tagMap,H)?r.tag=r.tagMap[H]+l:H==="!"?r.tag="!"+l:H==="!!"?r.tag="tag:yaml.org,2002:"+l:re(r,'undeclared tag handle "'+H+'"'),!0}c(at,"readTagProperty"),n(at,"readTagProperty");function st(r){var _,T;if(T=r.input.charCodeAt(r.position),T!==38)return!1;for(r.anchor!==null&&re(r,"duplication of an anchor property"),T=r.input.charCodeAt(++r.position),_=r.position;T!==0&&!q(T)&&!se(T);)T=r.input.charCodeAt(++r.position);return r.position===_&&re(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(_,r.position),!0}c(st,"readAnchorProperty"),n(st,"readAnchorProperty");function At(r){var _,T,Z;if(Z=r.input.charCodeAt(r.position),Z!==42)return!1;for(Z=r.input.charCodeAt(++r.position),_=r.position;Z!==0&&!q(Z)&&!se(Z);)Z=r.input.charCodeAt(++r.position);return r.position===_&&re(r,"name of an alias node must contain at least one character"),T=r.input.slice(_,r.position),e.call(r.anchorMap,T)||re(r,'unidentified alias "'+T+'"'),r.result=r.anchorMap[T],ye(r,!0,-1),!0}c(At,"readAlias"),n(At,"readAlias");function Ge(r,_,T,Z,H){var l,w,R,L=1,Y=!1,V=!1,P,X,J,ne,me;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,l=w=R=E===T||b===T,Z&&ye(r,!0,-1)&&(Y=!0,r.lineIndent>_?L=1:r.lineIndent===_?L=0:r.lineIndent<_&&(L=-1)),L===1)for(;at(r)||st(r);)ye(r,!0,-1)?(Y=!0,R=l,r.lineIndent>_?L=1:r.lineIndent===_?L=0:r.lineIndent<_&&(L=-1)):R=!1;if(R&&(R=Y||H),(L===1||E===T)&&(A===T||x===T?ne=_:ne=_+1,me=r.position-r.lineStart,L===1?R&&(be(r,me)||nt(r,me,ne))||W(r,ne)?V=!0:(w&&ae(r,ne)||Je(r,ne)||B(r,ne)?V=!0:At(r)?(V=!0,(r.tag!==null||r.anchor!==null)&&re(r,"alias node should not have any properties")):Ve(r,ne,A===T)&&(V=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):L===0&&(V=R&&be(r,me))),r.tag!==null&&r.tag!=="!")if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&re(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),P=0,X=r.implicitTypes.length;P<X;P+=1)if(J=r.implicitTypes[P],J.resolve(r.result)){r.result=J.construct(r.result),r.tag=J.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else e.call(r.typeMap[r.kind||"fallback"],r.tag)?(J=r.typeMap[r.kind||"fallback"][r.tag],r.result!==null&&J.kind!==r.kind&&re(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+J.kind+'", not "'+r.kind+'"'),J.resolve(r.result)?(r.result=J.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):re(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):re(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||V}c(Ge,"composeNode"),n(Ge,"composeNode");function ft(r){var _=r.position,T,Z,H,l=!1,w;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(w=r.input.charCodeAt(r.position))!==0&&(ye(r,!0,-1),w=r.input.charCodeAt(r.position),!(r.lineIndent>0||w!==37));){for(l=!0,w=r.input.charCodeAt(++r.position),T=r.position;w!==0&&!q(w);)w=r.input.charCodeAt(++r.position);for(Z=r.input.slice(T,r.position),H=[],Z.length<1&&re(r,"directive name must not be less than one character in length");w!==0;){for(;pe(w);)w=r.input.charCodeAt(++r.position);if(w===35){do w=r.input.charCodeAt(++r.position);while(w!==0&&!oe(w));break}if(oe(w))break;for(T=r.position;w!==0&&!q(w);)w=r.input.charCodeAt(++r.position);H.push(r.input.slice(T,r.position))}w!==0&&Re(r),e.call(We,Z)?We[Z](r,Z,H):Fe(r,'unknown document directive "'+Z+'"')}if(ye(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,ye(r,!0,-1)):l&&re(r,"directives end mark is expected"),Ge(r,r.lineIndent-1,E,!1,!0),ye(r,!0,-1),r.checkLineBreaks&&C.test(r.input.slice(_,r.position))&&Fe(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Ye(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,ye(r,!0,-1));return}if(r.position<r.length-1)re(r,"end of the stream or a document separator is expected");else return}c(ft,"readDocument"),n(ft,"readDocument");function et(r,_){r=String(r),_=_||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
22
|
+
`),r.charCodeAt(0)===65279&&(r=r.slice(1)));var T=new Ke(r,_),Z=r.indexOf("\0");for(Z!==-1&&(T.position=Z,re(T,"null byte is not allowed in input")),T.input+="\0";T.input.charCodeAt(T.position)===32;)T.lineIndent+=1,T.position+=1;for(;T.position<T.length-1;)ft(T);return T.documents}c(et,"loadDocuments"),n(et,"loadDocuments");function ze(r,_,T){_!==null&&typeof _=="object"&&typeof T>"u"&&(T=_,_=null);var Z=et(r,T);if(typeof _!="function")return Z;for(var H=0,l=Z.length;H<l;H+=1)_(Z[H])}c(ze,"loadAll"),n(ze,"loadAll");function pt(r,_){var T=et(r,_);if(T.length!==0){if(T.length===1)return T[0];throw new y("expected a single document in the stream, but found more")}}c(pt,"load"),n(pt,"load");function bt(r,_,T){return typeof _=="object"&&_!==null&&typeof T>"u"&&(T=_,_=null),ze(r,_,h.extend({schema:a},T))}c(bt,"safeLoadAll"),n(bt,"safeLoadAll");function dt(r,_){return pt(r,h.extend({schema:a},_))}return c(dt,"safeLoad"),n(dt,"safeLoad"),Qt.loadAll=ze,Qt.load=pt,Qt.safeLoadAll=bt,Qt.safeLoad=dt,Qt}c(is,"requireLoader");var Vr={},xo;function os(){if(xo)return Vr;xo=1;var g=Object.defineProperty,n=c((l,w)=>g(l,"name",{value:w,configurable:!0}),"o"),h=Xt(),y=Sr(),S=Gr(),a=Cr(),m=Object.prototype.toString,e=Object.prototype.hasOwnProperty,A=9,x=10,b=13,E=32,O=33,F=34,$=35,v=37,C=38,z=39,fe=42,ve=44,I=45,oe=58,pe=61,q=62,se=63,Oe=64,Ae=91,Ne=93,Me=96,De=123,qe=124,rt=125,Se={};Se[0]="\\0",Se[7]="\\a",Se[8]="\\b",Se[9]="\\t",Se[10]="\\n",Se[11]="\\v",Se[12]="\\f",Se[13]="\\r",Se[27]="\\e",Se[34]='\\"',Se[92]="\\\\",Se[133]="\\N",Se[160]="\\_",Se[8232]="\\L",Se[8233]="\\P";var He=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Ke(l,w){var R,L,Y,V,P,X,J;if(w===null)return{};for(R={},L=Object.keys(w),Y=0,V=L.length;Y<V;Y+=1)P=L[Y],X=String(w[P]),P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2)),J=l.compiledTypeMap.fallback[P],J&&e.call(J.styleAliases,X)&&(X=J.styleAliases[X]),R[P]=X;return R}c(Ke,"compileStyleMap"),n(Ke,"compileStyleMap");function Qe(l){var w,R,L;if(w=l.toString(16).toUpperCase(),l<=255)R="x",L=2;else if(l<=65535)R="u",L=4;else if(l<=4294967295)R="U",L=8;else throw new y("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+R+h.repeat("0",L-w.length)+w}c(Qe,"encodeHex"),n(Qe,"encodeHex");function re(l){this.schema=l.schema||S,this.indent=Math.max(1,l.indent||2),this.noArrayIndent=l.noArrayIndent||!1,this.skipInvalid=l.skipInvalid||!1,this.flowLevel=h.isNothing(l.flowLevel)?-1:l.flowLevel,this.styleMap=Ke(this.schema,l.styles||null),this.sortKeys=l.sortKeys||!1,this.lineWidth=l.lineWidth||80,this.noRefs=l.noRefs||!1,this.noCompatMode=l.noCompatMode||!1,this.condenseFlow=l.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}c(re,"State"),n(re,"State");function Fe(l,w){for(var R=h.repeat(" ",w),L=0,Y=-1,V="",P,X=l.length;L<X;)Y=l.indexOf(`
|
|
23
|
+
`,L),Y===-1?(P=l.slice(L),L=X):(P=l.slice(L,Y+1),L=Y+1),P.length&&P!==`
|
|
24
|
+
`&&(V+=R),V+=P;return V}c(Fe,"indentString"),n(Fe,"indentString");function We(l,w){return`
|
|
25
|
+
`+h.repeat(" ",l.indent*w)}c(We,"generateNextLine"),n(We,"generateNextLine");function we(l,w){var R,L,Y;for(R=0,L=l.implicitTypes.length;R<L;R+=1)if(Y=l.implicitTypes[R],Y.resolve(w))return!0;return!1}c(we,"testImplicitResolving"),n(we,"testImplicitResolving");function ke(l){return l===E||l===A}c(ke,"isWhitespace"),n(ke,"isWhitespace");function Ce(l){return 32<=l&&l<=126||161<=l&&l<=55295&&l!==8232&&l!==8233||57344<=l&&l<=65533&&l!==65279||65536<=l&&l<=1114111}c(Ce,"isPrintable"),n(Ce,"isPrintable");function Re(l){return Ce(l)&&!ke(l)&&l!==65279&&l!==b&&l!==x}c(Re,"isNsChar"),n(Re,"isNsChar");function ye(l,w){return Ce(l)&&l!==65279&&l!==ve&&l!==Ae&&l!==Ne&&l!==De&&l!==rt&&l!==oe&&(l!==$||w&&Re(w))}c(ye,"isPlainSafe"),n(ye,"isPlainSafe");function Ye(l){return Ce(l)&&l!==65279&&!ke(l)&&l!==I&&l!==se&&l!==oe&&l!==ve&&l!==Ae&&l!==Ne&&l!==De&&l!==rt&&l!==$&&l!==C&&l!==fe&&l!==O&&l!==qe&&l!==pe&&l!==q&&l!==z&&l!==F&&l!==v&&l!==Oe&&l!==Me}c(Ye,"isPlainSafeFirst"),n(Ye,"isPlainSafeFirst");function Ue(l){var w=/^\n* /;return w.test(l)}c(Ue,"needIndentIndicator"),n(Ue,"needIndentIndicator");var Ve=1,Je=2,B=3,W=4,ae=5;function be(l,w,R,L,Y){var V,P,X,J=!1,ne=!1,me=L!==-1,le=-1,je=Ye(l.charCodeAt(0))&&!ke(l.charCodeAt(l.length-1));if(w)for(V=0;V<l.length;V++){if(P=l.charCodeAt(V),!Ce(P))return ae;X=V>0?l.charCodeAt(V-1):null,je=je&&ye(P,X)}else{for(V=0;V<l.length;V++){if(P=l.charCodeAt(V),P===x)J=!0,me&&(ne=ne||V-le-1>L&&l[le+1]!==" ",le=V);else if(!Ce(P))return ae;X=V>0?l.charCodeAt(V-1):null,je=je&&ye(P,X)}ne=ne||me&&V-le-1>L&&l[le+1]!==" "}return!J&&!ne?je&&!Y(l)?Ve:Je:R>9&&Ue(l)?ae:ne?W:B}c(be,"chooseScalarStyle"),n(be,"chooseScalarStyle");function nt(l,w,R,L){l.dump=(function(){if(w.length===0)return"''";if(!l.noCompatMode&&He.indexOf(w)!==-1)return"'"+w+"'";var Y=l.indent*Math.max(1,R),V=l.lineWidth===-1?-1:Math.max(Math.min(l.lineWidth,40),l.lineWidth-Y),P=L||l.flowLevel>-1&&R>=l.flowLevel;function X(J){return we(l,J)}switch(c(X,"a"),n(X,"testAmbiguity"),be(w,P,l.indent,V,X)){case Ve:return w;case Je:return"'"+w.replace(/'/g,"''")+"'";case B:return"|"+at(w,l.indent)+st(Fe(w,Y));case W:return">"+at(w,l.indent)+st(Fe(At(w,V),Y));case ae:return'"'+ft(w)+'"';default:throw new y("impossible error: invalid scalar style")}})()}c(nt,"writeScalar"),n(nt,"writeScalar");function at(l,w){var R=Ue(l)?String(w):"",L=l[l.length-1]===`
|
|
26
|
+
`,Y=L&&(l[l.length-2]===`
|
|
27
|
+
`||l===`
|
|
28
|
+
`),V=Y?"+":L?"":"-";return R+V+`
|
|
29
|
+
`}c(at,"blockHeader"),n(at,"blockHeader");function st(l){return l[l.length-1]===`
|
|
30
|
+
`?l.slice(0,-1):l}c(st,"dropEndingNewline"),n(st,"dropEndingNewline");function At(l,w){for(var R=/(\n+)([^\n]*)/g,L=(function(){var ne=l.indexOf(`
|
|
31
|
+
`);return ne=ne!==-1?ne:l.length,R.lastIndex=ne,Ge(l.slice(0,ne),w)})(),Y=l[0]===`
|
|
32
|
+
`||l[0]===" ",V,P;P=R.exec(l);){var X=P[1],J=P[2];V=J[0]===" ",L+=X+(!Y&&!V&&J!==""?`
|
|
33
|
+
`:"")+Ge(J,w),Y=V}return L}c(At,"foldString"),n(At,"foldString");function Ge(l,w){if(l===""||l[0]===" ")return l;for(var R=/ [^ ]/g,L,Y=0,V,P=0,X=0,J="";L=R.exec(l);)X=L.index,X-Y>w&&(V=P>Y?P:X,J+=`
|
|
34
|
+
`+l.slice(Y,V),Y=V+1),P=X;return J+=`
|
|
35
|
+
`,l.length-Y>w&&P>Y?J+=l.slice(Y,P)+`
|
|
36
|
+
`+l.slice(P+1):J+=l.slice(Y),J.slice(1)}c(Ge,"foldLine"),n(Ge,"foldLine");function ft(l){for(var w="",R,L,Y,V=0;V<l.length;V++){if(R=l.charCodeAt(V),R>=55296&&R<=56319&&(L=l.charCodeAt(V+1),L>=56320&&L<=57343)){w+=Qe((R-55296)*1024+L-56320+65536),V++;continue}Y=Se[R],w+=!Y&&Ce(R)?l[V]:Y||Qe(R)}return w}c(ft,"escapeString"),n(ft,"escapeString");function et(l,w,R){var L="",Y=l.tag,V,P;for(V=0,P=R.length;V<P;V+=1)r(l,w,R[V],!1,!1)&&(V!==0&&(L+=","+(l.condenseFlow?"":" ")),L+=l.dump);l.tag=Y,l.dump="["+L+"]"}c(et,"writeFlowSequence"),n(et,"writeFlowSequence");function ze(l,w,R,L){var Y="",V=l.tag,P,X;for(P=0,X=R.length;P<X;P+=1)r(l,w+1,R[P],!0,!0)&&((!L||P!==0)&&(Y+=We(l,w)),l.dump&&x===l.dump.charCodeAt(0)?Y+="-":Y+="- ",Y+=l.dump);l.tag=V,l.dump=Y||"[]"}c(ze,"writeBlockSequence"),n(ze,"writeBlockSequence");function pt(l,w,R){var L="",Y=l.tag,V=Object.keys(R),P,X,J,ne,me;for(P=0,X=V.length;P<X;P+=1)me="",P!==0&&(me+=", "),l.condenseFlow&&(me+='"'),J=V[P],ne=R[J],r(l,w,J,!1,!1)&&(l.dump.length>1024&&(me+="? "),me+=l.dump+(l.condenseFlow?'"':"")+":"+(l.condenseFlow?"":" "),r(l,w,ne,!1,!1)&&(me+=l.dump,L+=me));l.tag=Y,l.dump="{"+L+"}"}c(pt,"writeFlowMapping"),n(pt,"writeFlowMapping");function bt(l,w,R,L){var Y="",V=l.tag,P=Object.keys(R),X,J,ne,me,le,je;if(l.sortKeys===!0)P.sort();else if(typeof l.sortKeys=="function")P.sort(l.sortKeys);else if(l.sortKeys)throw new y("sortKeys must be a boolean or a function");for(X=0,J=P.length;X<J;X+=1)je="",(!L||X!==0)&&(je+=We(l,w)),ne=P[X],me=R[ne],r(l,w+1,ne,!0,!0,!0)&&(le=l.tag!==null&&l.tag!=="?"||l.dump&&l.dump.length>1024,le&&(l.dump&&x===l.dump.charCodeAt(0)?je+="?":je+="? "),je+=l.dump,le&&(je+=We(l,w)),r(l,w+1,me,!0,le)&&(l.dump&&x===l.dump.charCodeAt(0)?je+=":":je+=": ",je+=l.dump,Y+=je));l.tag=V,l.dump=Y||"{}"}c(bt,"writeBlockMapping"),n(bt,"writeBlockMapping");function dt(l,w,R){var L,Y,V,P,X,J;for(Y=R?l.explicitTypes:l.implicitTypes,V=0,P=Y.length;V<P;V+=1)if(X=Y[V],(X.instanceOf||X.predicate)&&(!X.instanceOf||typeof w=="object"&&w instanceof X.instanceOf)&&(!X.predicate||X.predicate(w))){if(l.tag=R?X.tag:"?",X.represent){if(J=l.styleMap[X.tag]||X.defaultStyle,m.call(X.represent)==="[object Function]")L=X.represent(w,J);else if(e.call(X.represent,J))L=X.represent[J](w,J);else throw new y("!<"+X.tag+'> tag resolver accepts not "'+J+'" style');l.dump=L}return!0}return!1}c(dt,"detectType"),n(dt,"detectType");function r(l,w,R,L,Y,V){l.tag=null,l.dump=R,dt(l,R,!1)||dt(l,R,!0);var P=m.call(l.dump);L&&(L=l.flowLevel<0||l.flowLevel>w);var X=P==="[object Object]"||P==="[object Array]",J,ne;if(X&&(J=l.duplicates.indexOf(R),ne=J!==-1),(l.tag!==null&&l.tag!=="?"||ne||l.indent!==2&&w>0)&&(Y=!1),ne&&l.usedDuplicates[J])l.dump="*ref_"+J;else{if(X&&ne&&!l.usedDuplicates[J]&&(l.usedDuplicates[J]=!0),P==="[object Object]")L&&Object.keys(l.dump).length!==0?(bt(l,w,l.dump,Y),ne&&(l.dump="&ref_"+J+l.dump)):(pt(l,w,l.dump),ne&&(l.dump="&ref_"+J+" "+l.dump));else if(P==="[object Array]"){var me=l.noArrayIndent&&w>0?w-1:w;L&&l.dump.length!==0?(ze(l,me,l.dump,Y),ne&&(l.dump="&ref_"+J+l.dump)):(et(l,me,l.dump),ne&&(l.dump="&ref_"+J+" "+l.dump))}else if(P==="[object String]")l.tag!=="?"&&nt(l,l.dump,w,V);else{if(l.skipInvalid)return!1;throw new y("unacceptable kind of an object to dump "+P)}l.tag!==null&&l.tag!=="?"&&(l.dump="!<"+l.tag+"> "+l.dump)}return!0}c(r,"writeNode"),n(r,"writeNode");function _(l,w){var R=[],L=[],Y,V;for(T(l,R,L),Y=0,V=L.length;Y<V;Y+=1)w.duplicates.push(R[L[Y]]);w.usedDuplicates=new Array(V)}c(_,"getDuplicateReferences"),n(_,"getDuplicateReferences");function T(l,w,R){var L,Y,V;if(l!==null&&typeof l=="object")if(Y=w.indexOf(l),Y!==-1)R.indexOf(Y)===-1&&R.push(Y);else if(w.push(l),Array.isArray(l))for(Y=0,V=l.length;Y<V;Y+=1)T(l[Y],w,R);else for(L=Object.keys(l),Y=0,V=L.length;Y<V;Y+=1)T(l[L[Y]],w,R)}c(T,"inspectNode"),n(T,"inspectNode");function Z(l,w){w=w||{};var R=new re(w);return R.noRefs||_(l,R),r(R,0,l,!0,!0)?R.dump+`
|
|
37
|
+
`:""}c(Z,"dump"),n(Z,"dump");function H(l,w){return Z(l,h.extend({schema:a},w))}return c(H,"safeDump"),n(H,"safeDump"),Vr.dump=Z,Vr.safeDump=H,Vr}c(os,"requireDumper");var Oo;function as(){if(Oo)return xe;Oo=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"o"),h=is(),y=os();function S(a){return function(){throw new Error("Function "+a+" is deprecated and cannot be used.")}}return c(S,"deprecated"),n(S,"deprecated"),xe.Type=Ie(),xe.Schema=er(),xe.FAILSAFE_SCHEMA=si(),xe.JSON_SCHEMA=qo(),xe.CORE_SCHEMA=Yo(),xe.DEFAULT_SAFE_SCHEMA=Cr(),xe.DEFAULT_FULL_SCHEMA=Gr(),xe.load=h.load,xe.loadAll=h.loadAll,xe.safeLoad=h.safeLoad,xe.safeLoadAll=h.safeLoadAll,xe.dump=y.dump,xe.safeDump=y.safeDump,xe.YAMLException=Sr(),xe.MINIMAL_SCHEMA=si(),xe.SAFE_SCHEMA=Cr(),xe.DEFAULT_SCHEMA=Gr(),xe.scan=S("scan"),xe.parse=S("parse"),xe.compose=S("compose"),xe.addConstructor=S("addConstructor"),xe}c(as,"requireJsYaml$1");var ii,jo;function ss(){if(jo)return ii;jo=1;var g=as();return ii=g,ii}c(ss,"requireJsYaml");var oi,_o;function us(){if(_o)return oi;_o=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"n");function h(a,m){function e(){this.constructor=a}c(e,"r"),n(e,"ctor"),e.prototype=m.prototype,a.prototype=new e}c(h,"peg$subclass"),n(h,"peg$subclass");function y(a,m,e,A){this.message=a,this.expected=m,this.found=e,this.location=A,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),h(y,Error),y.buildMessage=function(a,m){var e={literal:n(function($){return'"'+x($.text)+'"'},"literal"),class:n(function($){var v="",C;for(C=0;C<$.parts.length;C++)v+=$.parts[C]instanceof Array?b($.parts[C][0])+"-"+b($.parts[C][1]):b($.parts[C]);return"["+($.inverted?"^":"")+v+"]"},"class"),any:n(function($){return"any character"},"any"),end:n(function($){return"end of input"},"end"),other:n(function($){return $.description},"other")};function A($){return $.charCodeAt(0).toString(16).toUpperCase()}c(A,"m"),n(A,"hex");function x($){return $.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(x,"D"),n(x,"literalEscape");function b($){return $.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+A(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+A(v)})}c(b,"P"),n(b,"classEscape");function E($){return e[$.type]($)}c(E,"T"),n(E,"describeExpectation");function O($){var v=new Array($.length),C,z;for(C=0;C<$.length;C++)v[C]=E($[C]);if(v.sort(),v.length>0){for(C=1,z=1;C<v.length;C++)v[C-1]!==v[C]&&(v[z]=v[C],z++);v.length=z}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"j"),n(O,"describeExpected");function F($){return $?'"'+x($)+'"':"end of input"}return c(F,"q"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(m)+" found."};function S(a,m){m=m!==void 0?m:{};var e={},A={Start:ar},x=ar,b=n(function(s){return[].concat(...s)},"peg$c0"),E="-",O=Ee("-",!1),F=n(function(s){return s},"peg$c3"),$=n(function(s){return Object.assign({},...s)},"peg$c4"),v="#",C=Ee("#",!1),z=Rr(),fe=n(function(){return{}},"peg$c8"),ve=":",I=Ee(":",!1),oe=n(function(s,d){return{[s]:d}},"peg$c11"),pe=",",q=Ee(",",!1),se=n(function(s,d){return d},"peg$c14"),Oe=n(function(s,d,j){return Object.assign({},...[s].concat(d).map(G=>({[G]:j})))},"peg$c15"),Ae=n(function(s){return s},"peg$c16"),Ne=n(function(s){return s},"peg$c17"),Me=Ct("correct indentation"),De=" ",qe=Ee(" ",!1),rt=n(function(s){return s.length===qt*hr},"peg$c21"),Se=n(function(s){return s.length===(qt+1)*hr},"peg$c22"),He=n(function(){return qt++,!0},"peg$c23"),Ke=n(function(){return qt--,!0},"peg$c24"),Qe=n(function(){return ir()},"peg$c25"),re=Ct("pseudostring"),Fe=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,We=it(["\r",`
|
|
38
|
+
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,ke=it(["\r",`
|
|
39
|
+
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Ce=n(function(){return ir().replace(/^ *| *$/g,"")},"peg$c31"),Re="--",ye=Ee("--",!1),Ye=/^[a-zA-Z\/0-9]/,Ue=it([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ve=/^[^\r\n\t :,]/,Je=it(["\r",`
|
|
40
|
+
`," "," ",":",","],!0,!1),B="null",W=Ee("null",!1),ae=n(function(){return null},"peg$c40"),be="true",nt=Ee("true",!1),at=n(function(){return!0},"peg$c43"),st="false",At=Ee("false",!1),Ge=n(function(){return!1},"peg$c46"),ft=Ct("string"),et='"',ze=Ee('"',!1),pt=n(function(){return""},"peg$c50"),bt=n(function(s){return s},"peg$c51"),dt=n(function(s){return s.join("")},"peg$c52"),r=/^[^"\\\0-\x1F\x7F]/,_=it(['"',"\\",["\0",""],""],!0,!1),T='\\"',Z=Ee('\\"',!1),H=n(function(){return'"'},"peg$c57"),l="\\\\",w=Ee("\\\\",!1),R=n(function(){return"\\"},"peg$c60"),L="\\/",Y=Ee("\\/",!1),V=n(function(){return"/"},"peg$c63"),P="\\b",X=Ee("\\b",!1),J=n(function(){return"\b"},"peg$c66"),ne="\\f",me=Ee("\\f",!1),le=n(function(){return"\f"},"peg$c69"),je="\\n",Kr=Ee("\\n",!1),Qr=n(function(){return`
|
|
41
|
+
`},"peg$c72"),Er="\\r",Ht=Ee("\\r",!1),Ut=n(function(){return"\r"},"peg$c75"),wt="\\t",wr=Ee("\\t",!1),kr=n(function(){return" "},"peg$c78"),tr="\\u",zr=Ee("\\u",!1),Zr=n(function(s,d,j,G){return String.fromCharCode(parseInt(`0x${s}${d}${j}${G}`))},"peg$c81"),kt=/^[0-9a-fA-F]/,xt=it([["0","9"],["a","f"],["A","F"]],!1,!1),Xr=Ct("blank space"),xr=/^[ \t]/,ut=it([" "," "],!1,!1),Or=Ct("white space"),jr=/^[ \t\n\r]/,_r=it([" "," ",`
|
|
42
|
+
`,"\r"],!1,!1),rr=`\r
|
|
43
|
+
`,en=Ee(`\r
|
|
44
|
+
`,!1),tn=`
|
|
45
|
+
`,rn=Ee(`
|
|
46
|
+
`,!1),nn="\r",on=Ee("\r",!1),p=0,ge=0,Wt=[{line:1,column:1}],tt=0,nr=[],te=0,Ft;if("startRule"in m){if(!(m.startRule in A))throw new Error(`Can't start parsing from rule "`+m.startRule+'".');x=A[m.startRule]}function ir(){return a.substring(ge,p)}c(ir,"ye"),n(ir,"text");function an(){return ht(ge,p)}c(an,"Jr"),n(an,"location");function Tr(s,d){throw d=d!==void 0?d:ht(ge,p),Vt([Ct(s)],a.substring(ge,p),d)}c(Tr,"Kr"),n(Tr,"expected");function sn(s,d){throw d=d!==void 0?d:ht(ge,p),Fr(s,d)}c(sn,"Qr"),n(sn,"error");function Ee(s,d){return{type:"literal",text:s,ignoreCase:d}}c(Ee,"A"),n(Ee,"peg$literalExpectation");function it(s,d,j){return{type:"class",parts:s,inverted:d,ignoreCase:j}}c(it,"w"),n(it,"peg$classExpectation");function Rr(){return{type:"any"}}c(Rr,"kr"),n(Rr,"peg$anyExpectation");function Lr(){return{type:"end"}}c(Lr,"zr"),n(Lr,"peg$endExpectation");function Ct(s){return{type:"other",description:s}}c(Ct,"S"),n(Ct,"peg$otherExpectation");function or(s){var d=Wt[s],j;if(d)return d;for(j=s-1;!Wt[j];)j--;for(d=Wt[j],d={line:d.line,column:d.column};j<s;)a.charCodeAt(j)===10?(d.line++,d.column=1):d.column++,j++;return Wt[s]=d,d}c(or,"Fe"),n(or,"peg$computePosDetails");function ht(s,d){var j=or(s),G=or(d);return{start:{offset:s,line:j.line,column:j.column},end:{offset:d,line:G.line,column:G.column}}}c(ht,"I"),n(ht,"peg$computeLocation");function ie(s){p<tt||(p>tt&&(tt=p,nr=[]),nr.push(s))}c(ie,"g"),n(ie,"peg$fail");function Fr(s,d){return new y(s,null,null,d)}c(Fr,"Br"),n(Fr,"peg$buildSimpleError");function Vt(s,d,j){return new y(y.buildMessage(s,d),s,d,j)}c(Vt,"Se"),n(Vt,"peg$buildStructuredError");function ar(){var s;return s=cr(),s}c(ar,"Le"),n(ar,"peg$parseStart");function sr(){var s,d,j;for(s=p,d=[],j=ur();j!==e;)d.push(j),j=ur();return d!==e&&(ge=s,d=b(d)),s=d,s}c(sr,"Mr"),n(sr,"peg$parseItemStatements");function ur(){var s,d,j,G,U;return s=p,d=Ot(),d!==e?(a.charCodeAt(p)===45?(j=E,p++):(j=e,te===0&&ie(O)),j!==e?(G=_e(),G!==e?(U=Pt(),U!==e?(ge=s,d=F(U),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s}c(ur,"De"),n(ur,"peg$parseItemStatement");function cr(){var s,d,j;for(s=p,d=[],j=lr();j!==e;)d.push(j),j=lr();return d!==e&&(ge=s,d=$(d)),s=d,s}c(cr,"Pe"),n(cr,"peg$parsePropertyStatements");function lr(){var s,d,j,G,U,ee,de,$e,Tt;if(s=p,d=_e(),d===e&&(d=null),d!==e){if(j=p,a.charCodeAt(p)===35?(G=v,p++):(G=e,te===0&&ie(C)),G!==e){if(U=[],ee=p,de=p,te++,$e=lt(),te--,$e===e?de=void 0:(p=de,de=e),de!==e?(a.length>p?($e=a.charAt(p),p++):($e=e,te===0&&ie(z)),$e!==e?(de=[de,$e],ee=de):(p=ee,ee=e)):(p=ee,ee=e),ee!==e)for(;ee!==e;)U.push(ee),ee=p,de=p,te++,$e=lt(),te--,$e===e?de=void 0:(p=de,de=e),de!==e?(a.length>p?($e=a.charAt(p),p++):($e=e,te===0&&ie(z)),$e!==e?(de=[de,$e],ee=de):(p=ee,ee=e)):(p=ee,ee=e);else U=e;U!==e?(G=[G,U],j=G):(p=j,j=e)}else p=j,j=e;if(j===e&&(j=null),j!==e){if(G=[],U=ct(),U!==e)for(;U!==e;)G.push(U),U=ct();else G=e;G!==e?(ge=s,d=fe(),s=d):(p=s,s=e)}else p=s,s=e}else p=s,s=e;if(s===e&&(s=p,d=Ot(),d!==e?(j=fr(),j!==e?(G=_e(),G===e&&(G=null),G!==e?(a.charCodeAt(p)===58?(U=ve,p++):(U=e,te===0&&ie(I)),U!==e?(ee=_e(),ee===e&&(ee=null),ee!==e?(de=Pt(),de!==e?(ge=s,d=oe(j,de),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,d=Ot(),d!==e?(j=$t(),j!==e?(G=_e(),G===e&&(G=null),G!==e?(a.charCodeAt(p)===58?(U=ve,p++):(U=e,te===0&&ie(I)),U!==e?(ee=_e(),ee===e&&(ee=null),ee!==e?(de=Pt(),de!==e?(ge=s,d=oe(j,de),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e))){if(s=p,d=Ot(),d!==e)if(j=$t(),j!==e)if(G=_e(),G!==e)if(U=Nt(),U!==e){if(ee=[],de=ct(),de!==e)for(;de!==e;)ee.push(de),de=ct();else ee=e;ee!==e?(ge=s,d=oe(j,U),s=d):(p=s,s=e)}else p=s,s=e;else p=s,s=e;else p=s,s=e;else p=s,s=e;if(s===e)if(s=p,d=Ot(),d!==e)if(j=$t(),j!==e){if(G=[],U=p,ee=_e(),ee===e&&(ee=null),ee!==e?(a.charCodeAt(p)===44?(de=pe,p++):(de=e,te===0&&ie(q)),de!==e?($e=_e(),$e===e&&($e=null),$e!==e?(Tt=$t(),Tt!==e?(ge=U,ee=se(j,Tt),U=ee):(p=U,U=e)):(p=U,U=e)):(p=U,U=e)):(p=U,U=e),U!==e)for(;U!==e;)G.push(U),U=p,ee=_e(),ee===e&&(ee=null),ee!==e?(a.charCodeAt(p)===44?(de=pe,p++):(de=e,te===0&&ie(q)),de!==e?($e=_e(),$e===e&&($e=null),$e!==e?(Tt=$t(),Tt!==e?(ge=U,ee=se(j,Tt),U=ee):(p=U,U=e)):(p=U,U=e)):(p=U,U=e)):(p=U,U=e);else G=e;G!==e?(U=_e(),U===e&&(U=null),U!==e?(a.charCodeAt(p)===58?(ee=ve,p++):(ee=e,te===0&&ie(I)),ee!==e?(de=_e(),de===e&&(de=null),de!==e?($e=Pt(),$e!==e?(ge=s,d=Oe(j,G,$e),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)}else p=s,s=e;else p=s,s=e}return s}c(lr,"Ie"),n(lr,"peg$parsePropertyStatement");function Pt(){var s,d,j,G,U,ee,de;if(s=p,d=p,te++,j=p,G=lt(),G!==e?(U=Pr(),U!==e?(a.charCodeAt(p)===45?(ee=E,p++):(ee=e,te===0&&ie(O)),ee!==e?(de=_e(),de!==e?(G=[G,U,ee,de],j=G):(p=j,j=e)):(p=j,j=e)):(p=j,j=e)):(p=j,j=e),te--,j!==e?(p=d,d=void 0):d=e,d!==e?(j=ct(),j!==e?(G=gt(),G!==e?(U=sr(),U!==e?(ee=jt(),ee!==e?(ge=s,d=Ae(U),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,d=lt(),d!==e?(j=gt(),j!==e?(G=cr(),G!==e?(U=jt(),U!==e?(ge=s,d=Ae(G),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e))if(s=p,d=It(),d!==e){if(j=[],G=ct(),G!==e)for(;G!==e;)j.push(G),G=ct();else j=e;j!==e?(ge=s,d=Ne(d),s=d):(p=s,s=e)}else p=s,s=e;return s}c(Pt,"Z"),n(Pt,"peg$parseExpression");function Ot(){var s,d,j;for(te++,s=p,d=[],a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ie(qe));j!==e;)d.push(j),a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ie(qe));return d!==e?(ge=p,j=rt(d),j?j=void 0:j=e,j!==e?(d=[d,j],s=d):(p=s,s=e)):(p=s,s=e),te--,s===e&&(d=e,te===0&&ie(Me)),s}c(Ot,"N"),n(Ot,"peg$parseSamedent");function Pr(){var s,d,j;for(s=p,d=[],a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ie(qe));j!==e;)d.push(j),a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ie(qe));return d!==e?(ge=p,j=Se(d),j?j=void 0:j=e,j!==e?(d=[d,j],s=d):(p=s,s=e)):(p=s,s=e),s}c(Pr,"Zr"),n(Pr,"peg$parseExtradent");function gt(){var s;return ge=p,s=He(),s?s=void 0:s=e,s}c(gt,"Ne"),n(gt,"peg$parseIndent");function jt(){var s;return ge=p,s=Ke(),s?s=void 0:s=e,s}c(jt,"Re"),n(jt,"peg$parseDedent");function fr(){var s;return s=Mt(),s===e&&(s=_t()),s}c(fr,"Ur"),n(fr,"peg$parseName");function $t(){var s,d,j;if(s=Mt(),s===e){if(s=p,d=[],j=St(),j!==e)for(;j!==e;)d.push(j),j=St();else d=e;d!==e&&(ge=s,d=Qe()),s=d}return s}c($t,"R"),n($t,"peg$parseLegacyName");function It(){var s;return s=pr(),s===e&&(s=Ir(),s===e&&(s=Mt(),s===e&&(s=_t()))),s}c(It,"Xr"),n(It,"peg$parseLiteral");function Nt(){var s;return s=pr(),s===e&&(s=Mt(),s===e&&(s=St())),s}c(Nt,"Yr"),n(Nt,"peg$parseLegacyLiteral");function _t(){var s,d,j,G,U,ee;if(te++,s=p,Fe.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(We)),d!==e){for(j=[],G=p,U=_e(),U===e&&(U=null),U!==e?(we.test(a.charAt(p))?(ee=a.charAt(p),p++):(ee=e,te===0&&ie(ke)),ee!==e?(U=[U,ee],G=U):(p=G,G=e)):(p=G,G=e);G!==e;)j.push(G),G=p,U=_e(),U===e&&(U=null),U!==e?(we.test(a.charAt(p))?(ee=a.charAt(p),p++):(ee=e,te===0&&ie(ke)),ee!==e?(U=[U,ee],G=U):(p=G,G=e)):(p=G,G=e);j!==e?(ge=s,d=Ce(),s=d):(p=s,s=e)}else p=s,s=e;return te--,s===e&&(d=e,te===0&&ie(re)),s}c(_t,"Te"),n(_t,"peg$parsepseudostring");function St(){var s,d,j,G,U;if(s=p,a.substr(p,2)===Re?(d=Re,p+=2):(d=e,te===0&&ie(ye)),d===e&&(d=null),d!==e)if(Ye.test(a.charAt(p))?(j=a.charAt(p),p++):(j=e,te===0&&ie(Ue)),j!==e){for(G=[],Ve.test(a.charAt(p))?(U=a.charAt(p),p++):(U=e,te===0&&ie(Je));U!==e;)G.push(U),Ve.test(a.charAt(p))?(U=a.charAt(p),p++):(U=e,te===0&&ie(Je));G!==e?(ge=s,d=Ce(),s=d):(p=s,s=e)}else p=s,s=e;else p=s,s=e;return s}c(St,"Q"),n(St,"peg$parsepseudostringLegacy");function pr(){var s,d;return s=p,a.substr(p,4)===B?(d=B,p+=4):(d=e,te===0&&ie(W)),d!==e&&(ge=s,d=ae()),s=d,s}c(pr,"je"),n(pr,"peg$parsenull");function Ir(){var s,d;return s=p,a.substr(p,4)===be?(d=be,p+=4):(d=e,te===0&&ie(nt)),d!==e&&(ge=s,d=at()),s=d,s===e&&(s=p,a.substr(p,5)===st?(d=st,p+=5):(d=e,te===0&&ie(At)),d!==e&&(ge=s,d=Ge()),s=d),s}c(Ir,"qr"),n(Ir,"peg$parseboolean");function Mt(){var s,d,j,G;return te++,s=p,a.charCodeAt(p)===34?(d=et,p++):(d=e,te===0&&ie(ze)),d!==e?(a.charCodeAt(p)===34?(j=et,p++):(j=e,te===0&&ie(ze)),j!==e?(ge=s,d=pt(),s=d):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,a.charCodeAt(p)===34?(d=et,p++):(d=e,te===0&&ie(ze)),d!==e?(j=Nr(),j!==e?(a.charCodeAt(p)===34?(G=et,p++):(G=e,te===0&&ie(ze)),G!==e?(ge=s,d=bt(j),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)),te--,s===e&&(d=e,te===0&&ie(ft)),s}c(Mt,"U"),n(Mt,"peg$parsestring");function Nr(){var s,d,j;if(s=p,d=[],j=dr(),j!==e)for(;j!==e;)d.push(j),j=dr();else d=e;return d!==e&&(ge=s,d=dt(d)),s=d,s}c(Nr,"Gr"),n(Nr,"peg$parsechars");function dr(){var s,d,j,G,U,ee;return r.test(a.charAt(p))?(s=a.charAt(p),p++):(s=e,te===0&&ie(_)),s===e&&(s=p,a.substr(p,2)===T?(d=T,p+=2):(d=e,te===0&&ie(Z)),d!==e&&(ge=s,d=H()),s=d,s===e&&(s=p,a.substr(p,2)===l?(d=l,p+=2):(d=e,te===0&&ie(w)),d!==e&&(ge=s,d=R()),s=d,s===e&&(s=p,a.substr(p,2)===L?(d=L,p+=2):(d=e,te===0&&ie(Y)),d!==e&&(ge=s,d=V()),s=d,s===e&&(s=p,a.substr(p,2)===P?(d=P,p+=2):(d=e,te===0&&ie(X)),d!==e&&(ge=s,d=J()),s=d,s===e&&(s=p,a.substr(p,2)===ne?(d=ne,p+=2):(d=e,te===0&&ie(me)),d!==e&&(ge=s,d=le()),s=d,s===e&&(s=p,a.substr(p,2)===je?(d=je,p+=2):(d=e,te===0&&ie(Kr)),d!==e&&(ge=s,d=Qr()),s=d,s===e&&(s=p,a.substr(p,2)===Er?(d=Er,p+=2):(d=e,te===0&&ie(Ht)),d!==e&&(ge=s,d=Ut()),s=d,s===e&&(s=p,a.substr(p,2)===wt?(d=wt,p+=2):(d=e,te===0&&ie(wr)),d!==e&&(ge=s,d=kr()),s=d,s===e&&(s=p,a.substr(p,2)===tr?(d=tr,p+=2):(d=e,te===0&&ie(zr)),d!==e?(j=Dt(),j!==e?(G=Dt(),G!==e?(U=Dt(),U!==e?(ee=Dt(),ee!==e?(ge=s,d=Zr(j,G,U,ee),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)))))))))),s}c(dr,"Oe"),n(dr,"peg$parsechar");function Dt(){var s;return kt.test(a.charAt(p))?(s=a.charAt(p),p++):(s=e,te===0&&ie(xt)),s}c(Dt,"X"),n(Dt,"peg$parsehexDigit");function _e(){var s,d;if(te++,s=[],xr.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(ut)),d!==e)for(;d!==e;)s.push(d),xr.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(ut));else s=e;return te--,s===e&&(d=e,te===0&&ie(Xr)),s}c(_e,"x"),n(_e,"peg$parseB");function Mr(){var s,d;if(te++,s=[],jr.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(_r)),d!==e)for(;d!==e;)s.push(d),jr.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(_r));else s=e;return te--,s===e&&(d=e,te===0&&ie(Or)),s}c(Mr,"Vr"),n(Mr,"peg$parseS");function ct(){var s,d,j,G,U,ee;if(s=p,d=lt(),d!==e){for(j=[],G=p,U=_e(),U===e&&(U=null),U!==e?(ee=lt(),ee!==e?(U=[U,ee],G=U):(p=G,G=e)):(p=G,G=e);G!==e;)j.push(G),G=p,U=_e(),U===e&&(U=null),U!==e?(ee=lt(),ee!==e?(U=[U,ee],G=U):(p=G,G=e)):(p=G,G=e);j!==e?(d=[d,j],s=d):(p=s,s=e)}else p=s,s=e;return s}c(ct,"y"),n(ct,"peg$parseEOL_ANY");function lt(){var s;return a.substr(p,2)===rr?(s=rr,p+=2):(s=e,te===0&&ie(en)),s===e&&(a.charCodeAt(p)===10?(s=tn,p++):(s=e,te===0&&ie(rn)),s===e&&(a.charCodeAt(p)===13?(s=nn,p++):(s=e,te===0&&ie(on)))),s}c(lt,"F"),n(lt,"peg$parseEOL");const hr=2;let qt=0;if(Ft=x(),Ft!==e&&p===a.length)return Ft;throw Ft!==e&&p<a.length&&ie(Lr()),Vt(nr,tt<a.length?a.charAt(tt):null,tt<a.length?ht(tt,tt+1):ht(tt,tt))}return c(S,"peg$parse"),n(S,"peg$parse"),oi={SyntaxError:y,parse:S},oi}c(us,"requireSyml$1");var To;function cs(){if(To)return Yt;To=1;var g=Object.defineProperty,n=c((v,C)=>g(v,"name",{value:C,configurable:!0}),"t");Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.PreserveOrdering=void 0,Yt.stringifySyml=b,Yt.parseSyml=$;const h=ss(),y=us(),S=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,a=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class m{static{c(this,"PreserveOrdering")}static{n(this,"PreserveOrdering")}constructor(C){this.data=C}}Yt.PreserveOrdering=m;function e(v){return v.match(S)?v:JSON.stringify(v)}c(e,"stringifyString"),n(e,"stringifyString");function A(v){return typeof v>"u"?!0:typeof v=="object"&&v!==null&&!Array.isArray(v)?Object.keys(v).every(C=>A(v[C])):!1}c(A,"isRemovableField"),n(A,"isRemovableField");function x(v,C,z){if(v===null)return`null
|
|
47
|
+
`;if(typeof v=="number"||typeof v=="boolean")return`${v.toString()}
|
|
48
|
+
`;if(typeof v=="string")return`${e(v)}
|
|
49
|
+
`;if(Array.isArray(v)){if(v.length===0)return`[]
|
|
50
|
+
`;const fe=" ".repeat(C);return`
|
|
51
|
+
${v.map(ve=>`${fe}- ${x(ve,C+1,!1)}`).join("")}`}if(typeof v=="object"&&v){const[fe,ve]=v instanceof m?[v.data,!1]:[v,!0],I=" ".repeat(C),oe=Object.keys(fe);ve&&oe.sort((q,se)=>{const Oe=a.indexOf(q),Ae=a.indexOf(se);return Oe===-1&&Ae===-1?q<se?-1:q>se?1:0:Oe!==-1&&Ae===-1?-1:Oe===-1&&Ae!==-1?1:Oe-Ae});const pe=oe.filter(q=>!A(fe[q])).map((q,se)=>{const Oe=fe[q],Ae=e(q),Ne=x(Oe,C+1,!0),Me=se>0||z?I:"",De=Ae.length>1024?`? ${Ae}
|
|
52
|
+
${Me}:`:`${Ae}:`,qe=Ne.startsWith(`
|
|
53
|
+
`)?Ne:` ${Ne}`;return`${Me}${De}${qe}`}).join(C===0?`
|
|
54
|
+
`:"")||`
|
|
55
|
+
`;return z?`
|
|
56
|
+
${pe}`:`${pe}`}throw new Error(`Unsupported value type (${v})`)}c(x,"stringifyValue"),n(x,"stringifyValue");function b(v){try{const C=x(v,0,!1);return C!==`
|
|
57
|
+
`?C:""}catch(C){throw C.location&&(C.message=C.message.replace(/(\.)?$/,` (line ${C.location.start.line}, column ${C.location.start.column})$1`)),C}}c(b,"stringifySyml"),n(b,"stringifySyml"),b.PreserveOrdering=m;function E(v){return v.endsWith(`
|
|
58
|
+
`)||(v+=`
|
|
59
|
+
`),(0,y.parse)(v)}c(E,"parseViaPeg"),n(E,"parseViaPeg");const O=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function F(v){if(O.test(v))return E(v);const C=(0,h.safeLoad)(v,{schema:h.FAILSAFE_SCHEMA,json:!0});if(C==null)return{};if(typeof C!="object")throw new Error(`Expected an indexed object, got a ${typeof C} instead. Does your file follow Yaml's rules?`);if(Array.isArray(C))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return C}c(F,"parseViaJsYaml"),n(F,"parseViaJsYaml");function $(v){return F(v)}return c($,"parseSyml"),n($,"parseSyml"),Yt}c(cs,"requireSyml");var Ro;function ls(){return Ro||(Ro=1,(function(g){var n=Object.defineProperty,h=c((m,e)=>n(m,"name",{value:e,configurable:!0}),"e");Object.defineProperty(g,"__esModule",{value:!0}),g.stringifySyml=g.parseSyml=g.stringifyResolution=g.parseResolution=g.stringifyValueArgument=g.stringifyShellLine=g.stringifyRedirectArgument=g.stringifyEnvSegment=g.stringifyCommandLineThen=g.stringifyCommandLine=g.stringifyCommandChainThen=g.stringifyCommandChain=g.stringifyCommand=g.stringifyArithmeticExpression=g.stringifyArgumentSegment=g.stringifyArgument=g.stringifyShell=g.parseShell=void 0;var y=Ma();Object.defineProperty(g,"parseShell",{enumerable:!0,get:h(function(){return y.parseShell},"get")}),Object.defineProperty(g,"stringifyShell",{enumerable:!0,get:h(function(){return y.stringifyShell},"get")}),Object.defineProperty(g,"stringifyArgument",{enumerable:!0,get:h(function(){return y.stringifyArgument},"get")}),Object.defineProperty(g,"stringifyArgumentSegment",{enumerable:!0,get:h(function(){return y.stringifyArgumentSegment},"get")}),Object.defineProperty(g,"stringifyArithmeticExpression",{enumerable:!0,get:h(function(){return y.stringifyArithmeticExpression},"get")}),Object.defineProperty(g,"stringifyCommand",{enumerable:!0,get:h(function(){return y.stringifyCommand},"get")}),Object.defineProperty(g,"stringifyCommandChain",{enumerable:!0,get:h(function(){return y.stringifyCommandChain},"get")}),Object.defineProperty(g,"stringifyCommandChainThen",{enumerable:!0,get:h(function(){return y.stringifyCommandChainThen},"get")}),Object.defineProperty(g,"stringifyCommandLine",{enumerable:!0,get:h(function(){return y.stringifyCommandLine},"get")}),Object.defineProperty(g,"stringifyCommandLineThen",{enumerable:!0,get:h(function(){return y.stringifyCommandLineThen},"get")}),Object.defineProperty(g,"stringifyEnvSegment",{enumerable:!0,get:h(function(){return y.stringifyEnvSegment},"get")}),Object.defineProperty(g,"stringifyRedirectArgument",{enumerable:!0,get:h(function(){return y.stringifyRedirectArgument},"get")}),Object.defineProperty(g,"stringifyShellLine",{enumerable:!0,get:h(function(){return y.stringifyShellLine},"get")}),Object.defineProperty(g,"stringifyValueArgument",{enumerable:!0,get:h(function(){return y.stringifyValueArgument},"get")});var S=qa();Object.defineProperty(g,"parseResolution",{enumerable:!0,get:h(function(){return S.parseResolution},"get")}),Object.defineProperty(g,"stringifyResolution",{enumerable:!0,get:h(function(){return S.stringifyResolution},"get")});var a=cs();Object.defineProperty(g,"parseSyml",{enumerable:!0,get:h(function(){return a.parseSyml},"get")}),Object.defineProperty(g,"stringifySyml",{enumerable:!0,get:h(function(){return a.stringifySyml},"get")})})(_n)),_n}c(ls,"requireLib");var Lo=ls(),fs=Object.defineProperty,Bt=c((g,n)=>fs(g,"name",{value:n,configurable:!0}),"f");const ps=Bt(g=>{const n=g.trim();if(n==="")return;const h=n.startsWith("@")?1:0,y=n.indexOf("@",h);if(y!==-1)return{name:n.slice(0,y),spec:n.slice(y+1)}},"splitSpecifier"),ds=Bt(g=>g.split(",").map(n=>ps(n)).filter(n=>n!==void 0),"parseKeySpecifiers"),hs=Bt(g=>{const n=new Map;for(const h of Object.keys(g)){if(h==="__metadata")continue;const y=ds(h),S=new Map;for(const{name:a,spec:m}of y){const e=S.get(a);e?e.push(m):S.set(a,[m])}for(const[a,m]of S){const e=n.get(a);e?e.push({key:h,specs:m}):n.set(a,[{key:h,specs:m}])}}return n},"buildNameIndex"),Fo=Bt((g,n,h)=>{const y=g.get(n);if(!y)return[];const S=new Set([h]);return h.includes(":")?h.startsWith("npm:")&&S.add(h.slice(4)):S.add(`npm:${h}`),y.filter(a=>a.specs.some(m=>S.has(m))).map(a=>a.key)},"findKeysFor"),gs=Bt((g,n)=>{const h=new Set,y=new Set(n.map(S=>S.relativeRoot).filter(S=>S!==""));for(const[S,a]of Object.entries(g)){if(S==="__metadata")continue;const m=a.resolution;if(typeof m!="string"||!m.includes("@workspace:"))continue;const e=m.split("@workspace:")[1];e!==void 0&&(e==="."||y.has(e))&&h.add(S)}return h},"collectWorkspaceKeys"),ms=Bt(g=>{const n=[];for(const h of[g.dependencies,g.optionalDependencies])if(h)for(const[y,S]of Object.entries(h))typeof S=="string"&&n.push({name:y,spec:S});return n},"collectDeps"),ys=Bt(g=>{const n=typeof g.lockfileContent=="string"?g.lockfileContent:g.lockfileContent.toString("utf8");let h;try{h=Lo.parseSyml(n)}catch(O){throw new vt(`yarn.lock: parse failed — ${O.message}`)}if(!h||typeof h!="object")throw new vt("yarn.lock: top-level value is not an object");const y=hs(h),S=new Set;h.__metadata!==void 0&&S.add("__metadata");const a=gs(h,g.closure);for(const O of a)S.add(O);for(const O of g.closure)if(O.deps)for(const[F,$]of Object.entries(O.deps)){if(typeof $!="string"||$.startsWith("workspace:")||$.startsWith("link:")||$.startsWith("portal:"))continue;const v=Fo(y,F,$);for(const C of v)S.add(C)}const m=[...S];for(;m.length>0;){const O=m.shift();if(O==="__metadata")continue;const F=h[O];if(F)for(const{name:$,spec:v}of ms(F)){if(v.startsWith("workspace:")||v.startsWith("link:")||v.startsWith("portal:"))continue;const C=Fo(y,$,v);for(const z of C)S.has(z)||(S.add(z),m.push(z))}}const e={};for(const O of Object.keys(h))S.has(O)&&(e[O]=h[O]);const A=Object.keys(h).length-(h.__metadata!==void 0?1:0),x=S.size-(S.has("__metadata")?1:0),b=A-x,E=h.__metadata!==void 0;return{content:Lo.stringifySyml(e),message:`yarn.lock (${E?"berry":"classic"}): kept ${x}/${A} entries (dropped ${b})`,status:"pruned"}},"pruneYarnLockfile");var vs=Object.defineProperty,As=c((g,n)=>vs(g,"name",{value:n,configurable:!0}),"n");const bs=As(g=>{switch(g.packageManager){case"bun":return Oa(g);case"npm":return Ra(g);case"pnpm":return Ia(g);case"yarn":return ys(g);default:{const n=g.packageManager;throw new vt(`Unsupported package manager: ${n}`)}}},"pruneLockfile");var Cs=Object.defineProperty,Et=c((g,n)=>Cs(g,"name",{value:n,configurable:!0}),"u");const $s=Et((g,n)=>{const h=new Set,y=[g],S=new Set([g]);for(;y.length>0;){const a=y.shift(),m=n.dependencies[a]??[];for(const e of m)S.has(e.target)||(S.add(e.target),h.add(e.target),y.push(e.target))}return h},"collectTransitiveProjectDeps"),Jr="vis-docker-manifest.json",Ss=["package.json","project.json"],Es=[{file:"bun.lock",manager:"bun"},{file:"bun.lockb",manager:"bun"},{file:"package-lock.json",manager:"npm"},{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"}],ws=["package.json","pnpm-workspace.yaml",".npmrc","vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],ks=Et((g,n)=>{const h=new Set(g);for(const y of g){const S=$s(y,n);for(const a of S)h.add(a)}return h},"resolveFocusProjects"),zt=Et(g=>{ma(g)},"ensureDir"),br=Et((g,n)=>{try{return zt(ui(n)),Io(g,n),!0}catch(h){if(h.code==="ENOENT")return!1;throw h}},"copyFileIfExists"),Ho=Et((g,n)=>{let h;try{h=ha(g)}catch{return}if(!h.isSymbolicLink()){if(h.isFile()){zt(ui(n)),Io(g,n);return}zt(n);for(const y of ga(g,{withFileTypes:!0}))y.name==="node_modules"||y.name===".git"||y.isSymbolicLink()||Ho(Be(g,y.name),Be(n,y.name))}},"copyTreeExcludingNodeModules"),Po=Et(g=>{if(!No(g))return;let n;try{n=Mo(g)}catch{return}const h={};for(const y of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const S=n[y];if(!(S===null||typeof S!="object"||Array.isArray(S)))for(const[a,m]of Object.entries(S))typeof m=="string"&&(h[a]=m)}return{deps:h,name:typeof n.name=="string"?n.name:void 0}},"readProjectInfo"),Ts=Et(g=>{const{focus:n,includeSources:h=!1,log:y=Et(v=>console.log(v),"log"),outDir:S,projectGraph:a,pruneLockfile:m=!0,workspace:e,workspaceRoot:A}=g,x=n.filter(v=>e.projects[v]===void 0);if(x.length>0)throw new Error(`Unknown focus project(s): ${x.join(", ")}. Check project names in your workspace.`);const b=ks(n,a),E=Be(S,"workspace"),O=Be(S,"sources");ai(E,{force:!0,recursive:!0}),ai(O,{force:!0,recursive:!0}),zt(E);for(const v of ws)br(Be(A,v),Be(E,v));const F=Po(Be(A,"package.json")),$=[{deps:F?.deps,name:F?.name,relativeRoot:""}];for(const v of b){const C=e.projects[v];if(!C?.root)continue;for(const fe of Ss)br(Be(A,C.root,fe),Be(E,C.root,fe));const z=Po(Be(A,C.root,"package.json"));$.push({deps:z?.deps,name:z?.name,relativeRoot:C.root})}for(const{file:v,manager:C}of Es){const z=Be(A,v);if(!No(z))continue;const fe=Be(E,v);if(!m){br(z,fe);continue}const ve=v.endsWith(".lockb")?Wi(z):Wi(z,"utf8");try{const I=bs({closure:$,lockfileContent:ve,packageManager:C});I.status==="pruned"&&I.content!==void 0?(zt(ui(fe)),Vi(fe,I.content)):br(z,fe),y(I.message)}catch(I){if(I instanceof vt)y(`${v}: pruning failed (${I.message}); copying verbatim`),br(z,fe);else throw I}}if(h){zt(O);for(const v of n){const C=e.projects[v];C?.root&&Ho(Be(A,C.root),Be(O,C.root))}}return Vi(Be(S,Jr),`${JSON.stringify({focus:n,projects:[...b].sort()},null,2)}
|
|
60
|
+
`),{projects:[...b]}},"scaffoldDockerContext"),Rs=Et(g=>{const{contextRoot:n,workspace:h,workspaceRoot:y}=g,S=Be(n,Jr);if(!ya(S))throw new Error(`No ${Jr} at ${n}. Run \`vis docker scaffold\` first.`);const a=Mo(S);if(!Array.isArray(a.projects))throw new TypeError(`Invalid ${Jr}: "projects" must be an array.`);const m=new Set(a.projects),e=[];for(const[A,x]of Object.entries(h.projects)){if(m.has(A)||!x.root)continue;const b=Be(y,x.root),E=va(y,b);E===""||E==="."||E.startsWith("..")||(ai(b,{force:!0,recursive:!0}),e.push(E))}return{removed:e}},"pruneDockerContext");export{Rs as p,ks as r,Ts as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var m=Object.defineProperty;var a=(t,e)=>m(t,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";import{M as v}from"../packem_chunks/config.js";import{o as j}from"../packem_chunks/bin.js";const h=p(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=a(t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{mkdirSync:y,writeFileSync:F,readdirSync:L}=u("node:fs"),{readFile:_}=u("node:fs/promises");var S=Object.defineProperty,i=a((t,e)=>S(t,"name",{value:e,configurable:!0}),"i");const c=i(t=>j(t),"getFailureLogDirectory"),l=i((t,e)=>v(c(t),`${encodeURIComponent(e)}.json`),"getFailureLogPath");class R{static{a(this,"FailureLogLifeCycle")}static{i(this,"FailureLogLifeCycle")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,o){if(r!=="failure")return;const n=c(this.#e);try{y(n,{recursive:!0})}catch{return}const d=e.overrides.command,f=e.projectRoot,g={command:d,cwd:f,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:o,timestamp:new Date().toISOString()};try{F(l(this.#e,e.id),`${JSON.stringify(g,void 0,2)}
|
|
2
|
+
`,"utf8")}catch{}}}const T=i(async(t,e)=>{const r=l(t,e);try{const o=await _(r,"utf8");return JSON.parse(o)}catch{return}},"loadFailureLog"),w=i(t=>{const e=c(t);let r;try{r=L(e)}catch{return[]}const o=[];for(const n of r)if(n.endsWith(".json"))try{o.push(decodeURIComponent(n.slice(0,-5)))}catch{}return o},"listFailureLogs");export{R as F,T as a,w as l};
|