@visulima/vis 1.0.0-alpha.2 → 1.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/CHANGELOG.md +840 -14
  2. package/LICENSE.md +7667 -0
  3. package/README.md +322 -19
  4. package/dist/bin.js +1 -146
  5. package/dist/config/index.d.ts +2795 -0
  6. package/dist/config/index.js +1 -0
  7. package/dist/generate/index.d.ts +157 -0
  8. package/dist/generate/index.js +1 -0
  9. package/dist/packem_chunks/bin.js +1295 -0
  10. package/dist/packem_chunks/config.js +19 -0
  11. package/dist/packem_chunks/doctor-probe.js +2 -0
  12. package/dist/packem_chunks/fix.js +11 -0
  13. package/dist/packem_chunks/handler.js +1 -0
  14. package/dist/packem_chunks/handler10.js +1 -0
  15. package/dist/packem_chunks/handler11.js +5 -0
  16. package/dist/packem_chunks/handler12.js +1 -0
  17. package/dist/packem_chunks/handler13.js +27 -0
  18. package/dist/packem_chunks/handler14.js +5 -0
  19. package/dist/packem_chunks/handler15.js +1 -0
  20. package/dist/packem_chunks/handler16.js +1 -0
  21. package/dist/packem_chunks/handler17.js +1 -0
  22. package/dist/packem_chunks/handler18.js +1 -0
  23. package/dist/packem_chunks/handler19.js +1 -0
  24. package/dist/packem_chunks/handler2.js +2 -0
  25. package/dist/packem_chunks/handler20.js +5 -0
  26. package/dist/packem_chunks/handler21.js +2 -0
  27. package/dist/packem_chunks/handler22.js +2 -0
  28. package/dist/packem_chunks/handler23.js +18 -0
  29. package/dist/packem_chunks/handler24.js +1 -0
  30. package/dist/packem_chunks/handler25.js +1 -0
  31. package/dist/packem_chunks/handler26.js +5 -0
  32. package/dist/packem_chunks/handler27.js +1 -0
  33. package/dist/packem_chunks/handler28.js +3 -0
  34. package/dist/packem_chunks/handler29.js +1 -0
  35. package/dist/packem_chunks/handler3.js +4 -0
  36. package/dist/packem_chunks/handler30.js +7 -0
  37. package/dist/packem_chunks/handler31.js +33 -0
  38. package/dist/packem_chunks/handler32.js +3 -0
  39. package/dist/packem_chunks/handler33.js +1 -0
  40. package/dist/packem_chunks/handler34.js +26 -0
  41. package/dist/packem_chunks/handler35.js +3 -0
  42. package/dist/packem_chunks/handler36.js +7 -0
  43. package/dist/packem_chunks/handler37.js +22 -0
  44. package/dist/packem_chunks/handler38.js +428 -0
  45. package/dist/packem_chunks/handler39.js +6 -0
  46. package/dist/packem_chunks/handler4.js +8 -0
  47. package/dist/packem_chunks/handler40.js +24 -0
  48. package/dist/packem_chunks/handler41.js +10 -0
  49. package/dist/packem_chunks/handler42.js +153 -0
  50. package/dist/packem_chunks/handler43.js +25 -0
  51. package/dist/packem_chunks/handler44.js +24 -0
  52. package/dist/packem_chunks/handler45.js +213 -0
  53. package/dist/packem_chunks/handler46.js +3 -0
  54. package/dist/packem_chunks/handler47.js +27 -0
  55. package/dist/packem_chunks/handler48.js +167 -0
  56. package/dist/packem_chunks/handler49.js +34 -0
  57. package/dist/packem_chunks/handler5.js +1 -0
  58. package/dist/packem_chunks/handler6.js +1 -0
  59. package/dist/packem_chunks/handler7.js +1 -0
  60. package/dist/packem_chunks/handler8.js +1 -0
  61. package/dist/packem_chunks/handler9.js +2 -0
  62. package/dist/packem_chunks/heal-accept.js +10 -0
  63. package/dist/packem_chunks/heal.js +14 -0
  64. package/dist/packem_chunks/help-command.js +18 -0
  65. package/dist/packem_chunks/index.js +7 -0
  66. package/dist/packem_chunks/keys-refresh.js +4 -0
  67. package/dist/packem_chunks/list.js +3 -0
  68. package/dist/packem_chunks/loader.js +1 -0
  69. package/dist/packem_chunks/prune.js +3 -0
  70. package/dist/packem_chunks/run.js +1 -0
  71. package/dist/packem_chunks/status.js +2 -0
  72. package/dist/packem_chunks/sync.js +2 -0
  73. package/dist/packem_chunks/sync2.js +2 -0
  74. package/dist/packem_chunks/tar.js +3 -0
  75. package/dist/packem_chunks/tripwire.js +2 -0
  76. package/dist/packem_shared/advisories-DsynpacV.js +1 -0
  77. package/dist/packem_shared/ai-analysis-uYuTIIXi.js +68 -0
  78. package/dist/packem_shared/ai-cache-DuwHYx2O.js +1 -0
  79. package/dist/packem_shared/ai-fix-DzrA-dVz.js +43 -0
  80. package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
  81. package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
  82. package/dist/packem_shared/cache-directory-DQak1Vjc.js +1 -0
  83. package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
  84. package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
  85. package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
  86. package/dist/packem_shared/docker-B-CIN_nj.js +60 -0
  87. package/dist/packem_shared/failure-log-C3LEMmkq.js +2 -0
  88. package/dist/packem_shared/flakiness-Dq6K4ymq.js +1 -0
  89. package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
  90. package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
  91. package/dist/packem_shared/index-DH-5hsrC.js +1 -0
  92. package/dist/packem_shared/lifecycle-Dv3nAtoD.js +2 -0
  93. package/dist/packem_shared/lockfile-C5DYMHVq.js +1 -0
  94. package/dist/packem_shared/manifests-B0fMp872.js +1 -0
  95. package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
  96. package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
  97. package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
  98. package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
  99. package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
  100. package/dist/packem_shared/run-summary-utils-BaBGP3bo.js +1 -0
  101. package/dist/packem_shared/runtime-check-BusAwPb2.js +1 -0
  102. package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
  103. package/dist/packem_shared/selectors-B2ISH581.js +3 -0
  104. package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
  105. package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
  106. package/dist/packem_shared/toolchain-Cc3cwyLP.js +5 -0
  107. package/dist/packem_shared/typosquats-BCeR-sLf.js +1 -0
  108. package/dist/packem_shared/use-measured-height-DjYgUOKk.js +1 -0
  109. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  110. package/dist/packem_shared/verify-07kUNTuP.js +1 -0
  111. package/dist/packem_shared/vis-update-app-CFrlJ3mW.js +1 -0
  112. package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
  113. package/index.d.ts +358 -0
  114. package/index.js +609 -0
  115. package/package.json +57 -22
  116. package/schemas/project.schema.json +872 -0
  117. package/schemas/vis-config.schema.json +4306 -0
  118. package/skills/vis/SKILL.md +96 -0
  119. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  120. package/templates/buildkite-ci/template.yml +20 -0
  121. package/dist/ai-analysis.d.ts +0 -40
  122. package/dist/ai-cache.d.ts +0 -21
  123. package/dist/bin.d.ts +0 -1
  124. package/dist/catalog.d.ts +0 -110
  125. package/dist/commands/affected.d.ts +0 -3
  126. package/dist/commands/ai.d.ts +0 -3
  127. package/dist/commands/analyze.d.ts +0 -3
  128. package/dist/commands/check.d.ts +0 -3
  129. package/dist/commands/graph.d.ts +0 -3
  130. package/dist/commands/hook/constants.d.ts +0 -8
  131. package/dist/commands/hook/index.d.ts +0 -3
  132. package/dist/commands/hook/install.d.ts +0 -7
  133. package/dist/commands/hook/migrate.d.ts +0 -27
  134. package/dist/commands/hook/uninstall.d.ts +0 -3
  135. package/dist/commands/migrate/constants.d.ts +0 -12
  136. package/dist/commands/migrate/deps.d.ts +0 -32
  137. package/dist/commands/migrate/index.d.ts +0 -3
  138. package/dist/commands/migrate/json.d.ts +0 -20
  139. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  140. package/dist/commands/migrate/types.d.ts +0 -20
  141. package/dist/commands/run.d.ts +0 -3
  142. package/dist/commands/staged.d.ts +0 -3
  143. package/dist/commands/update.d.ts +0 -3
  144. package/dist/config.d.ts +0 -40
  145. package/dist/config.js +0 -1
  146. package/dist/package-manager.d.ts +0 -23
  147. package/dist/workspace.d.ts +0 -58
@@ -0,0 +1,60 @@
1
+ var fa=Object.defineProperty;var c=(g,n)=>fa(g,"name",{value:n,configurable:!0});import{createRequire as pa}from"node:module";import{b as ya,g as ci,M as Be,n as Do,B as Ji,i as va,z as Aa}from"../packem_chunks/config.js";import{b8 as ba,bB as Ca}from"../packem_chunks/bin.js";const da=pa(import.meta.url),vr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ha=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 da(g)},"__cjs_getBuiltinModule"),{cpSync:No,lstatSync:ga,readdirSync:ma,existsSync:Mo,rmSync:si,readFileSync:Vi}=ha("node:fs");var $a=Object.defineProperty,Sa=c((g,n)=>$a(g,"name",{value:n,configurable:!0}),"t");class vt extends Error{static{c(this,"LockfilePruneError")}static{Sa(this,"LockfilePruneError")}constructor(n){super(n),this.name="LockfilePruneError"}}var Ea=Object.defineProperty,Sr=c((g,n)=>Ea(g,"name",{value:n,configurable:!0}),"p");const wa=Sr(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"),ka=Sr(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"),xa=Sr(g=>{for(const n of g)if(typeof n=="object"&&!Array.isArray(n))return n},"extractMetadata"),Oa=Sr(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"),ja=Sr(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=wa(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(...ka(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=xa(S[C]);for(const fe of Oa(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 _a=Object.defineProperty,li=c((g,n)=>_a(g,"name",{value:n,configurable:!0}),"g");const _n="node_modules/",Ta=li((g,n,h)=>{let y=n;for(;;){const S=y===""?`${_n}${h}`:`${y}/${_n}${h}`;if(g[S]!==void 0)return S;if(y==="")return;const a=y.lastIndexOf(`/${_n.slice(0,-1)}/`);y=a===-1?"":y.slice(0,a)}},"resolveDep"),Ra=li(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"),La=li(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 Ra($)){const C=Ta(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 Fa=Object.defineProperty,Zt=c((g,n)=>Fa(g,"name",{value:n,configurable:!0}),"a");const qo=Zt(g=>{let n=g.startsWith("/")?g.slice(1):g;const h=n.indexOf("(");return h!==-1&&(n=n.slice(0,h)),n},"canonicalKey"),Pa=Zt((g,n)=>{if(!(n.startsWith("link:")||n.startsWith("file:")||n.startsWith("workspace:")))return`${g}@${n}`},"resolveDepKey"),Ia=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"),Gi=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"),Ki=Zt(g=>{const n=new Map;if(!g)return n;for(const h of Object.keys(g)){const y=qo(h),S=n.get(y);S?S.push(h):n.set(y,[h])}return n},"buildKeyIndex"),Na=Zt(g=>{const n=typeof g.lockfileContent=="string"?g.lockfileContent:g.lockfileContent.toString("utf8");let h;try{h=ba(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=Ki(h.packages),a=Ki(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 Ia(C))b.push(z);for(;b.length>0;){const{name:C,version:z}=b.shift(),fe=Pa(C,z);if(!fe)continue;const ve=qo(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 Gi(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 Gi(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:Ca(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 Tn={},Le={},Rn,Qi;function Ma(){if(Qi)return Rn;Qi=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:pn},x=pn,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"),Qr=n(function(t){return{type:"shell",shell:t,quoted:!1}},"peg$c71"),zr=n(function(t){return{type:"variable",...t,quoted:!1}},"peg$c72"),wr=n(function(t){return{type:"glob",pattern:t}},"peg$c73"),Ht=/^[^']/,Ut=Ze(["'"],!0,!1),wt=n(function(t){return t.join("")},"peg$c76"),kr=/^[^$"]/,xr=Ze(["$",'"'],!0,!1),tr=`\\
5
+ `,Zr=ue(`\\
6
+ `,!1),Xr=n(function(){return""},"peg$c81"),kt="\\",xt=ue("\\",!1),en=/^[\\$"`]/,Or=Ze(["\\","$",'"',"`"],!1,!1),ut=n(function(t){return t},"peg$c86"),jr="\\a",_r=ue("\\a",!1),Tr=n(function(){return"a"},"peg$c89"),rr="\\b",tn=ue("\\b",!1),rn=n(function(){return"\b"},"peg$c92"),nn=/^[Ee]/,on=Ze(["E","e"],!1,!1),an=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),sn=n(function(){return"\r"},"peg$c104"),Rr="\\t",un=ue("\\t",!1),Ee=n(function(){return" "},"peg$c107"),it="\\v",Lr=ue("\\v",!1),Fr=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",Pr=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]/,Ir=Ze([["0","9"],["a","f"],["A","f"]],!1,!1),gt=Ei(),jt="{}",fr=ue("{}",!1),$t=n(function(){return"{}"},"peg$c128"),It="-",Nt=ue("-",!1),_t="+",St=ue("+",!1),pr=".",Nr=ue(".",!1),Mt=n(function(t,o,u){return{type:"number",value:(t==="-"?-1:1)*parseFloat(o.join("")+"."+u.join(""))}},"peg$c135"),Mr=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"),Dr="*",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),Wo=n(function(t){return t},"peg$c154"),mt="${",gr=ue("${",!1),fi=":-",Vo=ue(":-",!1),Jo=n(function(t,o){return{name:t,defaultValue:o}},"peg$c159"),pi=":-}",Go=ue(":-}",!1),Ko=n(function(t){return{name:t,defaultValue:[]}},"peg$c162"),di=":+",Qo=ue(":+",!1),zo=n(function(t,o){return{name:t,alternativeValue:o}},"peg$c165"),hi=":+}",Zo=ue(":+}",!1),Xo=n(function(t){return{name:t,alternativeValue:[]}},"peg$c168"),gi=n(function(t){return{name:t}},"peg$c169"),ea="$",ta=ue("$",!1),ra=n(function(t){return m.isGlobPattern(t)},"peg$c172"),na=n(function(t){return t},"peg$c173"),mi=/^[a-zA-Z0-9_]/,yi=Ze([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),vi=n(function(){return Si()},"peg$c176"),Ai=/^[$@*?#a-zA-Z0-9_\-]/,bi=Ze(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ia=/^[()}<>$|&; \t"']/,oa=Ze(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),aa=/^[<>&; \t"']/,sa=Ze(["<",">","&",";"," "," ",'"',"'"],!1,!1),Ci=/^[ \t]/,$i=Ze([" "," "],!1,!1),i=0,K=0,qr=[{line:1,column:1}],yt=0,cn=[],N=0,Yr;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 Si(){return a.substring(K,i)}c(Si,"Di"),n(Si,"text");function ua(){return Jt(K,i)}c(ua,"er"),n(ua,"location");function ca(t,o){throw o=o!==void 0?o:Jt(K,i),fn([ki(t)],a.substring(K,i),o)}c(ca,"sr"),n(ca,"expected");function la(t,o){throw o=o!==void 0?o:Jt(K,i),xi(t,o)}c(la,"fr"),n(la,"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 Ei(){return{type:"any"}}c(Ei,"Qi"),n(Ei,"peg$anyExpectation");function wi(){return{type:"end"}}c(wi,"Ri"),n(wi,"peg$endExpectation");function ki(t){return{type:"other",description:t}}c(ki,"Vi"),n(ki,"peg$otherExpectation");function ln(t){var o=qr[t],u;if(o)return o;for(u=t-1;!qr[u];)u--;for(o=qr[u],o={line:o.line,column:o.column};u<t;)a.charCodeAt(u)===10?(o.line++,o.column=1):o.column++,u++;return qr[t]=o,o}c(ln,"bs"),n(ln,"peg$computePosDetails");function Jt(t,o){var u=ln(t),f=ln(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,cn=[]),cn.push(t))}c(D,"g"),n(D,"peg$fail");function xi(t,o){return new y(t,null,null,o)}c(xi,"Ii"),n(xi,"peg$buildSimpleError");function fn(t,o,u){return new y(y.buildMessage(t,o),t,o,u)}c(fn,"ms"),n(fn,"peg$buildStructuredError");function pn(){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(pn,"ys"),n(pn,"peg$parseStart");function Gt(){var t,o,u,f,k;if(t=i,o=Br(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=dn(),f!==e?(k=Oi(),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=Br(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=dn(),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 Oi(){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(Oi,"Li"),n(Oi,"peg$parseShellLineThen");function dn(){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(dn,"xs"),n(dn,"peg$parseShellLineType");function Br(){var t,o,u;return t=i,o=hn(),o!==e?(u=ji(),u===e&&(u=null),u!==e?(K=t,o=fe(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(Br,"oe"),n(Br,"peg$parseCommandLine");function ji(){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=_i(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Br(),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(ji,"ji"),n(ji,"peg$parseCommandLineThen");function _i(){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(_i,"qi"),n(_i,"peg$parseCommandLineType");function hn(){var t,o,u;return t=i,o=Li(),o!==e?(u=Ti(),u===e&&(u=null),u!==e?(K=t,o=se(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(hn,"Ss"),n(hn,"peg$parseCommandChain");function Ti(){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=Ri(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=hn(),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(Ti,"_i"),n(Ti,"peg$parseCommandChainThen");function Ri(){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(Ri,"zi"),n(Ri,"peg$parseCommandChainType");function mr(){var t,o,u,f,k,M;if(t=i,o=kn(),o!==e)if(a.charCodeAt(i)===61?(u=qe,i++):(u=e,N===0&&D(rt)),u!==e)if(f=yn(),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=kn(),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 Li(){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=mn(),M!==e)for(;M!==e;)k.push(M),M=mn();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(Li,"Gi"),n(Li,"peg$parseCommand");function gn(){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(gn,"Es"),n(gn,"peg$parseCommandString");function mn(){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(mn,"Fs"),n(mn,"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=Fi(),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 Fi(){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(Fi,"Zi"),n(Fi,"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=yn(),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 yn(){var t,o,u;if(t=i,o=[],u=vn(),u!==e)for(;u!==e;)o.push(u),u=vn();else o=e;return o!==e&&(K=t,o=r(o)),t=o,t}c(yn,"Ts"),n(yn,"peg$parseStrictValueArgument");function vn(){var t,o;return 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===e&&(t=i,o=Mi(),o!==e&&(K=t,o=_(o)),t=o))),t}c(vn,"Ps"),n(vn,"peg$parseArgumentSegment");function Pi(){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=Yi(),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,"Hi"),n(Pi,"peg$parseCQuoteString");function Ii(){var t,o,u,f;return t=i,a.charCodeAt(i)===39?(o=H,i++):(o=e,N===0&&D(l)),o!==e?(u=Di(),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(Ii,"Ui"),n(Ii,"peg$parseSglQuoteString");function Ni(){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=An();f!==e;)u.push(f),f=An();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(Ni,"ki"),n(Ni,"peg$parseDblQuoteString");function Mi(){var t,o,u;if(t=i,o=[],u=bn(),u!==e)for(;u!==e;)o.push(u),u=bn();else o=e;return o!==e&&(K=t,o=X(o)),t=o,t}c(Mi,"Mi"),n(Mi,"peg$parsePlainString");function An(){var t,o;return t=i,o=En(),o!==e&&(K=t,o=J(o)),t=o,t===e&&(t=i,o=wn(),o!==e&&(K=t,o=ne(o)),t=o,t===e&&(t=i,o=Vr(),o!==e&&(K=t,o=me(o)),t=o,t===e&&(t=i,o=qi(),o!==e&&(K=t,o=le(o)),t=o))),t}c(An,"Ds"),n(An,"peg$parseDblQuoteStringSegment");function bn(){var t,o;return t=i,o=En(),o!==e&&(K=t,o=je(o)),t=o,t===e&&(t=i,o=wn(),o!==e&&(K=t,o=Qr(o)),t=o,t===e&&(t=i,o=Vr(),o!==e&&(K=t,o=zr(o)),t=o,t===e&&(t=i,o=Ui(),o!==e&&(K=t,o=wr(o)),t=o,t===e&&(t=i,o=Hi(),o!==e&&(K=t,o=le(o)),t=o)))),t}c(bn,"Qs"),n(bn,"peg$parsePlainStringSegment");function Di(){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(Di,"Ni"),n(Di,"peg$parseSglQuoteStringText");function qi(){var t,o,u;if(t=i,o=[],u=Cn(),u===e&&(kr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(xr))),u!==e)for(;u!==e;)o.push(u),u=Cn(),u===e&&(kr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(xr)));else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(qi,"Bi"),n(qi,"peg$parseDblQuoteStringText");function Cn(){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=Xr()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(en.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}c(Cn,"Rs"),n(Cn,"peg$parseDblQuoteEscapedChar");function Yi(){var t,o,u;for(t=i,o=[],u=$n(),u===e&&(Ht.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Ut)));u!==e;)o.push(u),u=$n(),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(Yi,"Oi"),n(Yi,"peg$parseCQuoteStringText");function $n(){var t,o,u;return t=i,a.substr(i,2)===jr?(o=jr,i+=2):(o=e,N===0&&D(_r)),o!==e&&(K=t,o=Tr()),t=o,t===e&&(t=i,a.substr(i,2)===rr?(o=rr,i+=2):(o=e,N===0&&D(tn)),o!==e&&(K=t,o=rn()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(nn.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(on)),u!==e?(K=t,o=an(),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=sn()),t=o,t===e&&(t=i,a.substr(i,2)===Rr?(o=Rr,i+=2):(o=e,N===0&&D(un)),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(Lr)),o!==e&&(K=t,o=Fr()),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=Bi()))))))))),t}c($n,"Vs"),n($n,"peg$parseCQuoteEscapedChar");function Bi(){var t,o,u,f,k,M,ce,he,Te,Pe,ot,jn;return t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(u=Hr(),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(Pr)),o!==e?(u=i,f=i,k=Hr(),k!==e?(M=Xe(),M!==e?(k=[k,M],f=k):(i=f,f=e)):(i=f,f=e),f===e&&(f=Hr()),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?(jn=Xe(),jn!==e?(k=[k,M,ce,he,Te,Pe,ot,jn],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(Bi,"Xi"),n(Bi,"peg$parseHexCodeString");function Hr(){var t;return lr.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Pt)),t}c(Hr,"$e"),n(Hr,"peg$parseHexCodeChar0");function Xe(){var t;return Ot.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Ir)),t}c(Xe,"x"),n(Xe,"peg$parseHexCodeChar");function Hi(){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=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,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=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(Hi,"Ji"),n(Hi,"peg$parsePlainStringText");function Ur(){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(Nr)),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=Mr(o,u),t=o):(i=t,t=e)}else i=t,t=e;if(t===e&&(t=i,o=Vr(),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=Sn(),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(Ur,"Ae"),n(Ur,"peg$parseArithmeticPrimary");function Wr(){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)===42?(M=Dr,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=Ur(),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=Dr,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=Ur(),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(Wr,"de"),n(Wr,"peg$parseArithmeticTimesExpression");function Sn(){var t,o,u,f,k,M,ce,he;if(t=i,o=Wr(),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=Wr(),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=Wr(),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(Sn,"Is"),n(Sn,"peg$parseArithmeticExpression");function En(){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=Sn(),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(En,"Ls"),n(En,"peg$parseArithmetic");function wn(){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=Wo(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(wn,"js"),n(wn,"peg$parseSubshell");function Vr(){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)===fi?(f=fi,i+=2):(f=e,N===0&&D(Vo)),f!==e?(k=gn(),k!==e?(a.charCodeAt(i)===125?(M=Ce,i++):(M=e,N===0&&D(Re)),M!==e?(K=t,o=Jo(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)===pi?(f=pi,i+=3):(f=e,N===0&&D(Go)),f!==e?(K=t,o=Ko(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)===di?(f=di,i+=2):(f=e,N===0&&D(Qo)),f!==e?(k=gn(),k!==e?(a.charCodeAt(i)===125?(M=Ce,i++):(M=e,N===0&&D(Re)),M!==e?(K=t,o=zo(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)===hi?(f=hi,i+=3):(f=e,N===0&&D(Zo)),f!==e?(K=t,o=Xo(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=gi(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.charCodeAt(i)===36?(o=ea,i++):(o=e,N===0&&D(ta)),o!==e?(u=Rt(),u!==e?(K=t,o=gi(u),t=o):(i=t,t=e)):(i=t,t=e)))))),t}c(Vr,"we"),n(Vr,"peg$parseVariable");function Ui(){var t,o,u;return t=i,o=Wi(),o!==e?(K=i,u=ra(o),u?u=void 0:u=e,u!==e?(K=t,o=na(o),t=o):(i=t,t=e)):(i=t,t=e),t}c(Ui,"Ki"),n(Ui,"peg$parseGlob");function Wi(){var t,o,u,f,k;if(t=i,o=[],u=i,f=i,N++,k=On(),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=On(),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(Wi,"Wi"),n(Wi,"peg$parseGlobText");function kn(){var t,o,u;if(t=i,o=[],mi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(yi)),u!==e)for(;u!==e;)o.push(u),mi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(yi));else o=e;return o!==e&&(K=t,o=vi()),t=o,t}c(kn,"qs"),n(kn,"peg$parseEnvVariable");function Rt(){var t,o,u;if(t=i,o=[],Ai.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(bi)),u!==e)for(;u!==e;)o.push(u),Ai.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(bi));else o=e;return o!==e&&(K=t,o=vi()),t=o,t}c(Rt,"R"),n(Rt,"peg$parseIdentifier");function xn(){var t;return ia.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(oa)),t}c(xn,"_s"),n(xn,"peg$parseSpecialShellChars");function On(){var t;return aa.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(sa)),t}c(On,"zs"),n(On,"peg$parseGlobSpecialShellChars");function Q(){var t,o;if(t=[],Ci.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D($i)),o!==e)for(;o!==e;)t.push(o),Ci.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D($i));else t=e;return t}if(c(Q,"h"),n(Q,"peg$parseS"),Yr=x(),Yr!==e&&i===a.length)return Yr;throw Yr!==e&&i<a.length&&D(wi()),fn(cn,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"),Rn={SyntaxError:y,parse:S},Rn}c(Ma,"requireShell$1");var zi;function Da(){if(zi)return Le;zi=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=Ma();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(Da,"requireShell");var Ar={},Ln,Zi;function qa(){if(Zi)return Ln;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"),Ln={SyntaxError:y,parse:S},Ln}c(qa,"requireResolution$1");var Xi;function Ya(){if(Xi)return Ar;Xi=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=qa();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(Ya,"requireResolution");var Yt={},xe={},Qt={},Lt={},eo;function Xt(){if(eo)return Lt;eo=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 Fn,to;function Er(){if(to)return Fn;to=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"),Fn=h,Fn}c(Er,"requireException");var Pn,ro;function Ba(){if(ro)return Pn;ro=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"),Pn=y,Pn}c(Ba,"requireMark");var In,no;function Ie(){if(no)return In;no=1;var g=Object.defineProperty,n=c((e,A)=>g(e,"name",{value:A,configurable:!0}),"i"),h=Er(),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"),In=m,In}c(Ie,"requireType");var Nn,io;function er(){if(io)return Nn;io=1;var g=Object.defineProperty,n=c((A,x)=>g(A,"name",{value:x,configurable:!0}),"a"),h=Xt(),y=Er(),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"),Nn=e,Nn}c(er,"requireSchema");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}),"e"),h=Ie();return Mn=new h("tag:yaml.org,2002:str",{kind:"scalar",construct:n(function(y){return y!==null?y:""},"construct")}),Mn}c(Ha,"requireStr");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:seq",{kind:"sequence",construct:n(function(y){return y!==null?y:[]},"construct")}),Dn}c(Ua,"requireSeq");var qn,so;function Wa(){if(so)return qn;so=1;var g=Object.defineProperty,n=c((y,S)=>g(y,"name",{value:S,configurable:!0}),"r"),h=Ie();return qn=new h("tag:yaml.org,2002:map",{kind:"mapping",construct:n(function(y){return y!==null?y:{}},"construct")}),qn}c(Wa,"requireMap");var Yn,uo;function ui(){if(uo)return Yn;uo=1;var g=er();return Yn=new g({explicit:[Ha(),Ua(),Wa()]}),Yn}c(ui,"requireFailsafe");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}),"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"),Bn=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"}),Bn}c(Va,"require_null");var Hn,lo;function Ja(){if(lo)return Hn;lo=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"),Hn=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"}),Hn}c(Ja,"requireBool");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}),"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"),Un=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"]}}),Un}c(Ga,"requireInt");var Wn,po;function Ka(){if(po)return Wn;po=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"),Wn=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:m,predicate:x,represent:A,defaultStyle:"lowercase"}),Wn}c(Ka,"requireFloat");var Vn,ho;function Yo(){if(ho)return Vn;ho=1;var g=er();return Vn=new g({include:[ui()],implicit:[Va(),Ja(),Ga(),Ka()]}),Vn}c(Yo,"requireJson");var Jn,go;function Bo(){if(go)return Jn;go=1;var g=er();return Jn=new g({include:[Yo()]}),Jn}c(Bo,"requireCore");var Gn,mo;function Qa(){if(mo)return Gn;mo=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"),Gn=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:a,construct:m,instanceOf:Date,represent:e}),Gn}c(Qa,"requireTimestamp");var Kn,yo;function za(){if(yo)return Kn;yo=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"),Kn=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:y}),Kn}c(za,"requireMerge");function Ho(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(Ho,"commonjsRequire");var Qn,vo;function Za(){if(vo)return Qn;vo=1;var g=Object.defineProperty,n=c((b,E)=>g(b,"name",{value:E,configurable:!0}),"x"),h;try{var y=Ho;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"),Qn=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:m,construct:e,predicate:x,represent:A}),Qn}c(Za,"requireBinary");var zn,Ao;function Xa(){if(Ao)return zn;Ao=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"),zn=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a,construct:m}),zn}c(Xa,"requireOmap");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}),"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(es,"requirePairs");var Xn,Co;function ts(){if(Co)return Xn;Co=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"),Xn=new h("tag:yaml.org,2002:set",{kind:"mapping",resolve:S,construct:a}),Xn}c(ts,"requireSet");var ei,$o;function $r(){if($o)return ei;$o=1;var g=er();return ei=new g({include:[Bo()],implicit:[Qa(),za()],explicit:[Za(),Xa(),es(),ts()]}),ei}c($r,"requireDefault_safe");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}),"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"),ti=new h("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:y,construct:S,predicate:m,represent:a}),ti}c(rs,"require_undefined");var ri,Eo;function ns(){if(Eo)return ri;Eo=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"),ri=new h("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:y,construct:S,predicate:m,represent:a}),ri}c(ns,"requireRegexp");var ni,wo;function is(){if(wo)return ni;wo=1;var g=Object.defineProperty,n=c((x,b)=>g(x,"name",{value:b,configurable:!0}),"o"),h;try{var y=Ho;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"),ni=new S("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:a,construct:m,predicate:A,represent:e}),ni}c(is,"require_function");var ii,ko;function Kr(){if(ko)return ii;ko=1;var g=er();return ii=g.DEFAULT=new g({include:[$r()],explicit:[rs(),ns(),is()]}),ii}c(Kr,"requireDefault_full");var xo;function os(){if(xo)return Qt;xo=1;var g=Object.defineProperty,n=c((r,_)=>g(r,"name",{value:_,configurable:!0}),"x"),h=Xt(),y=Er(),S=Ba(),a=$r(),m=Kr(),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(os,"requireLoader");var Jr={},Oo;function as(){if(Oo)return Jr;Oo=1;var g=Object.defineProperty,n=c((l,w)=>g(l,"name",{value:w,configurable:!0}),"o"),h=Xt(),y=Er(),S=Kr(),a=$r(),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"),Jr.dump=Z,Jr.safeDump=H,Jr}c(as,"requireDumper");var jo;function ss(){if(jo)return xe;jo=1;var g=Object.defineProperty,n=c((a,m)=>g(a,"name",{value:m,configurable:!0}),"o"),h=os(),y=as();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=ui(),xe.JSON_SCHEMA=Yo(),xe.CORE_SCHEMA=Bo(),xe.DEFAULT_SAFE_SCHEMA=$r(),xe.DEFAULT_FULL_SCHEMA=Kr(),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=Er(),xe.MINIMAL_SCHEMA=ui(),xe.SAFE_SCHEMA=$r(),xe.DEFAULT_SCHEMA=Kr(),xe.scan=S("scan"),xe.parse=S("parse"),xe.compose=S("compose"),xe.addConstructor=S("addConstructor"),xe}c(ss,"requireJsYaml$1");var oi,_o;function us(){if(_o)return oi;_o=1;var g=ss();return oi=g,oi}c(us,"requireJsYaml");var ai,To;function cs(){if(To)return ai;To=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=Lr(),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",Qr=Ee("\\n",!1),zr=n(function(){return`
41
+ `},"peg$c72"),wr="\\r",Ht=Ee("\\r",!1),Ut=n(function(){return"\r"},"peg$c75"),wt="\\t",kr=Ee("\\t",!1),xr=n(function(){return" "},"peg$c78"),tr="\\u",Zr=Ee("\\u",!1),Xr=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),en=Ct("blank space"),Or=/^[ \t]/,ut=it([" "," "],!1,!1),jr=Ct("white space"),_r=/^[ \t\n\r]/,Tr=it([" "," ",`
42
+ `,"\r"],!1,!1),rr=`\r
43
+ `,tn=Ee(`\r
44
+ `,!1),rn=`
45
+ `,nn=Ee(`
46
+ `,!1),on="\r",an=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 sn(){return ht(ge,p)}c(sn,"Jr"),n(sn,"location");function Rr(s,d){throw d=d!==void 0?d:ht(ge,p),Vt([Ct(s)],a.substring(ge,p),d)}c(Rr,"Kr"),n(Rr,"expected");function un(s,d){throw d=d!==void 0?d:ht(ge,p),Pr(s,d)}c(un,"Qr"),n(un,"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 Lr(){return{type:"any"}}c(Lr,"kr"),n(Lr,"peg$anyExpectation");function Fr(){return{type:"end"}}c(Fr,"zr"),n(Fr,"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 Pr(s,d){return new y(s,null,null,d)}c(Pr,"Br"),n(Pr,"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=Ir(),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 Ir(){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(Ir,"Zr"),n(Ir,"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=Nr(),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 Nr(){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(Nr,"qr"),n(Nr,"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=Mr(),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 Mr(){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(Mr,"Gr"),n(Mr,"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(Qr)),d!==e&&(ge=s,d=zr()),s=d,s===e&&(s=p,a.substr(p,2)===wr?(d=wr,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(kr)),d!==e&&(ge=s,d=xr()),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=Xr(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=[],Or.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(ut)),d!==e)for(;d!==e;)s.push(d),Or.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(en)),s}c(_e,"x"),n(_e,"peg$parseB");function Dr(){var s,d;if(te++,s=[],_r.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(Tr)),d!==e)for(;d!==e;)s.push(d),_r.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ie(Tr));else s=e;return te--,s===e&&(d=e,te===0&&ie(jr)),s}c(Dr,"Vr"),n(Dr,"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(tn)),s===e&&(a.charCodeAt(p)===10?(s=rn,p++):(s=e,te===0&&ie(nn)),s===e&&(a.charCodeAt(p)===13?(s=on,p++):(s=e,te===0&&ie(an)))),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(Fr()),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"),ai={SyntaxError:y,parse:S},ai}c(cs,"requireSyml$1");var Ro;function ls(){if(Ro)return Yt;Ro=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=us(),y=cs(),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(ls,"requireSyml");var Lo;function fs(){return Lo||(Lo=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=Da();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=Ya();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=ls();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")})})(Tn)),Tn}c(fs,"requireLib");var Fo=fs(),ps=Object.defineProperty,Bt=c((g,n)=>ps(g,"name",{value:n,configurable:!0}),"f");const br="__metadata",ds=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"),hs=Bt(g=>g.split(",").map(n=>ds(n)).filter(n=>n!==void 0),"parseKeySpecifiers"),gs=Bt(g=>{const n=new Map;for(const h of Object.keys(g)){if(h==="__metadata")continue;const y=hs(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"),Po=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"),ms=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{resolution:m}=a;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"),ys=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"),vs=Bt(g=>{const n=typeof g.lockfileContent=="string"?g.lockfileContent:g.lockfileContent.toString("utf8");let h;try{h=Fo.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=gs(h),S=new Set;h[br]!==void 0&&S.add(br);const a=ms(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=Po(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 ys(F)){if(v.startsWith("workspace:")||v.startsWith("link:")||v.startsWith("portal:"))continue;const C=Po(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[br]===void 0?0:1),x=S.size-(S.has(br)?1:0),b=A-x,E=h[br]!==void 0;return{content:Fo.stringifySyml(e),message:`yarn.lock (${E?"berry":"classic"}): kept ${x}/${A} entries (dropped ${b})`,status:"pruned"}},"pruneYarnLockfile");var As=Object.defineProperty,bs=c((g,n)=>As(g,"name",{value:n,configurable:!0}),"n");const Cs=bs(g=>{switch(g.packageManager){case"bun":return ja(g);case"npm":return La(g);case"pnpm":return Na(g);case"yarn":return vs(g);default:{const n=g.packageManager;throw new vt(`Unsupported package manager: ${n}`)}}},"pruneLockfile");var $s=Object.defineProperty,Et=c((g,n)=>$s(g,"name",{value:n,configurable:!0}),"u");const Ss=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"),Gr="vis-docker-manifest.json",Es=["package.json","project.json"],ws=[{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"}],ks=["package.json","pnpm-workspace.yaml",".npmrc","vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],xs=Et((g,n)=>{const h=new Set(g);for(const y of g){const S=Ss(y,n);for(const a of S)h.add(a)}return h},"resolveFocusProjects"),zt=Et(g=>{ya(g)},"ensureDir"),Cr=Et((g,n)=>{try{return zt(ci(n)),No(g,n),!0}catch(h){if(h.code==="ENOENT")return!1;throw h}},"copyFileIfExists"),Uo=Et((g,n)=>{let h;try{h=ga(g)}catch{return}if(!h.isSymbolicLink()){if(h.isFile()){zt(ci(n)),No(g,n);return}zt(n);for(const y of ma(g,{withFileTypes:!0}))y.name==="node_modules"||y.name===".git"||y.isSymbolicLink()||Uo(Be(g,y.name),Be(n,y.name))}},"copyTreeExcludingNodeModules"),Io=Et(g=>{if(!Mo(g))return;let n;try{n=Do(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"),Rs=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=xs(n,a),E=Be(S,"workspace"),O=Be(S,"sources");si(E,{force:!0,recursive:!0}),si(O,{force:!0,recursive:!0}),zt(E);for(const v of ks)Cr(Be(A,v),Be(E,v));const F=Io(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 Es)Cr(Be(A,C.root,fe),Be(E,C.root,fe));const z=Io(Be(A,C.root,"package.json"));$.push({deps:z?.deps,name:z?.name,relativeRoot:C.root})}for(const{file:v,manager:C}of ws){const z=Be(A,v);if(!Mo(z))continue;const fe=Be(E,v);if(!m){Cr(z,fe);continue}const ve=v.endsWith(".lockb")?Vi(z):Vi(z,"utf8");try{const I=Cs({closure:$,lockfileContent:ve,packageManager:C});I.status==="pruned"&&I.content!==void 0?(zt(ci(fe)),Ji(fe,I.content)):Cr(z,fe),y(I.message)}catch(I){if(I instanceof vt)y(`${v}: pruning failed (${I.message}); copying verbatim`),Cr(z,fe);else throw I}}if(h){zt(O);for(const v of n){const C=e.projects[v];C?.root&&Uo(Be(A,C.root),Be(O,C.root))}}return Ji(Be(S,Gr),`${JSON.stringify({focus:n,projects:[...b].sort()},null,2)}
60
+ `),{projects:[...b]}},"scaffoldDockerContext"),Ls=Et(g=>{const{contextRoot:n,workspace:h,workspaceRoot:y}=g,S=Be(n,Gr);if(!va(S))throw new Error(`No ${Gr} at ${n}. Run \`vis docker scaffold\` first.`);const a=Do(S);if(!Array.isArray(a.projects))throw new TypeError(`Invalid ${Gr}: "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=Aa(y,b);E===""||E==="."||E.startsWith("..")||(si(b,{force:!0,recursive:!0}),e.push(E))}return{removed:e}},"pruneDockerContext");export{Ls as p,xs as r,Rs 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{r 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};
@@ -0,0 +1 @@
1
+ var h=Object.defineProperty;var f=(a,s)=>h(a,"name",{value:s,configurable:!0});import{createRequire as R}from"node:module";import{i as b,n as T,M as j}from"../packem_chunks/config.js";import{o as v}from"../packem_chunks/bin.js";const S=R(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=f(a=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,o]=l.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return l.getBuiltinModule(a)}return S(a)},"__cjs_getBuiltinModule"),{readdirSync:y}=k("node:fs");var F=Object.defineProperty,m=f((a,s)=>F(a,"name",{value:s,configurable:!0}),"i");const P=m((a,s)=>{let o=0,n=0,r=0;for(const[,t]of a)switch(t.status){case"failure":{r+=1;break}case"local-cache":case"local-cache-kept-existing":case"remote-cache":{n+=1;break}case"success":{o+=1;break}}const c=[];o>0&&c.push(`${String(o)} succeeded`),n>0&&c.push(`${String(n)} cached`),r>0&&c.push(`${String(r)} failed`);const u=(s/1e3).toFixed(1);return c.push(`${u}s`),c.join(" · ")},"formatTimingSummary"),p=m(a=>{const s=v(a);if(!b(s))return[];const o=y(s).filter(r=>r.endsWith(".json")),n=[];for(const r of o)try{n.push(T(j(s,r)))}catch{}return n},"loadRunSummaries"),A=m((a,s,o)=>{const n=o??p(a);if(n.length<2)return;let r=0,c=0;for(const e of n)typeof e.duration=="number"&&e.duration>0&&(r+=e.duration,c+=1);if(c<2)return;const u=r/c-s,t=Math.abs(u/1e3).toFixed(1);return Math.abs(u)<500?"(about average)":u>0?`(${t}s faster than avg)`:`(${t}s slower than avg)`},"compareDuration");var _=Object.defineProperty,d=f((a,s)=>_(a,"name",{value:s,configurable:!0}),"o");const D=d((a,s={},o)=>{const n=o??p(a);if(n.length===0)return[];const r=new Map;for(const t of n)if(!(s.since&&(t.startTime===void 0||t.startTime<s.since))&&Array.isArray(t.tasks))for(const e of t.tasks){if(e.cacheStatus==="HIT"||e.cacheStatus==="REMOTE_HIT"||e.cacheStatus==="SKIPPED")continue;const i=r.get(e.taskId)??{failures:0,project:e.target.project,retriedSuccesses:0,successes:0,target:e.target.target,totalRuns:0};i.totalRuns+=1,e.exitCode!==void 0&&e.exitCode!==0?(i.failures+=1,i.lastFailure=e.startTime??t.startTime):(e.retryAttempts&&e.retryAttempts>0&&(i.retriedSuccesses+=1,i.lastRetry=e.startTime??t.startTime),i.successes+=1),r.set(e.taskId,i)}const c=s.minRuns??2,u=[];for(const[t,e]of r){if(e.totalRuns<c||e.failures===0&&e.retriedSuccesses===0)continue;const i=(e.failures+.5*e.retriedSuccesses)/e.totalRuns;u.push({failures:e.failures,flakinessRate:i,lastFailure:e.lastFailure,lastRetry:e.lastRetry,project:e.project,retriedSuccesses:e.retriedSuccesses,successes:e.successes,target:e.target,taskId:t,totalRuns:e.totalRuns})}return u.sort((t,e)=>e.flakinessRate-t.flakinessRate),u},"analyzeFlakiness"),E=d(a=>{if(a.length===0)return["No flaky tasks detected."];const s=["Task","Runs","Failures","Retried","Rate","Last Failure"],o=a.map(t=>[t.taskId,String(t.totalRuns),String(t.failures),String(t.retriedSuccesses),`${(t.flakinessRate*100).toFixed(1)}%`,t.lastFailure??t.lastRetry??"—"]),n=s.map((t,e)=>{let i=0;for(const g of o)i=Math.max(i,(g[e]??"").length);return Math.max(t.length,i)}),r=d((t,e)=>t.padEnd(e),"pad"),c=n.map(t=>"─".repeat(t)).join("──"),u=[s.map((t,e)=>r(t,n[e])).join(" "),c];for(const t of o)u.push(t.map((e,i)=>r(e,n[i])).join(" "));return u},"formatFlakinessTable");export{D as a,E as b,A as c,P as f,p as l};
@@ -0,0 +1,2 @@
1
+ var De=Object.defineProperty;var f=(r,e)=>De(r,"name",{value:e,configurable:!0});import{createRequire as Fe}from"node:module";const Ne=Fe(import.meta.url),z=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=f(r=>{if(typeof z<"u"&&z.versions&&z.versions.node){const[e,t]=z.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return z.getBuiltinModule(r)}return Ne(r)},"__cjs_getBuiltinModule"),{createRequire:Me}=k("node:module"),{existsSync:x,createWriteStream:se,readdirSync:Ge,renameSync:He}=k("node:fs"),{readFile:ie,mkdir:H,rm:M,writeFile:Be,mkdtemp:Le}=k("node:fs/promises"),{PassThrough:ae,Readable:q,pipeline:Re}=k("node:stream"),{spawn:ce,spawnSync:Ue}=k("node:child_process"),{delimiter:J,resolve:We,dirname:Xe,normalize:qe,join:Y}=k("node:path"),{cwd:Je}=z,Ye=k("node:readline"),{pipeline:Ze}=k("node:stream/promises"),{homedir:Ve,tmpdir:le}=k("node:os"),{promisify:Ke}=k("node:util");var Qe=Object.defineProperty,et=f((r,e)=>Qe(r,"name",{value:e,configurable:!0}),"a$1"),Z=Object.defineProperty,tt=et((r,e)=>{let t={};for(var n in r)Z(t,n,{get:r[n],enumerable:!0});return e||Z(t,Symbol.toStringTag,{value:"Module"}),t},"__exportAll"),rt=Object.defineProperty,p=f((r,e)=>rt(r,"name",{value:e,configurable:!0}),"a");const nt=/^[A-Za-z]:\//;function F(r=""){return r&&r.replace(/\\/g,"/").replace(nt,e=>e.toUpperCase())}f(F,"P");p(F,"p");const ot=/^[/\\]{2}/,st=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,ue=/^[A-Za-z]:$/,V=/^\/([A-Za-z]:)?$/,pe=p(function(r){if(r.length===0)return".";r=F(r);let e=r.match(ot),t=D(r),n=r[r.length-1]==="/";return r=R(r,!t),r.length===0?t?"/":n?"./":".":(n&&(r+="/"),ue.test(r)&&(r+="/"),e?t?`//${r}`:`//./${r}`:t&&!D(r)?`/${r}`:r)},"g"),K=p(function(...r){let e="";for(let t of r)if(t)if(e.length>0){let n=e[e.length-1]==="/",o=t[0]==="/";n&&o?e+=t.slice(1):e+=n||o?t:`/${t}`}else e+=t;return pe(e)},"_");function de(){return typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}f(de,"st");p(de,"v");const $=p(function(...r){r=r.map(n=>F(n));let e="",t=!1;for(let n=r.length-1;n>=-1&&!t;n--){let o=n>=0?r[n]:de();!o||o.length===0||(e=`${o}/${e}`,t=D(o))}return e=R(e,!t),t&&!D(e)?`/${e}`:e.length>0?e:"."},"y");function R(r,e){let t="",n=0,o=-1,i=0,c=null;for(let s=0;s<=r.length;++s){if(s<r.length)c=r[s];else{if(c==="/")break;c="/"}if(c==="/"){if(!(o===s-1||i===1))if(i===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let a=t.lastIndexOf("/");a===-1?(t="",n=0):(t=t.slice(0,a),n=t.length-1-t.lastIndexOf("/")),o=s,i=0;continue}else if(t.length>0){t="",n=0,o=s,i=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${r.slice(o+1,s)}`:t=r.slice(o+1,s),n=s-o-1;o=s,i=0}else c==="."&&i!==-1?++i:i=-1}return t}f(R,"W");p(R,"b");const D=p(function(r){return st.test(r)},"x"),he=p(function(r,e){let t=$(r).replace(V,"$1").split("/"),n=$(e).replace(V,"$1").split("/");if(n[0][1]===":"&&t[0][1]===":"&&t[0]!==n[0])return n.join("/");let o=[...t];for(let i of o){if(n[0]!==i)break;t.shift(),n.shift()}return[...t.map(()=>".."),...n].join("/")},"S"),fe=p(function(r){let e=F(r).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&ue.test(e[0])&&(e[0]+="/"),e.join("/")||(D(r)?"/":".")},"C"),me=p(function(r,e){let t=F(r).split("/"),n="";for(let o=t.length-1;o>=0;o--){let i=t[o];if(i){n=i;break}}return e&&n.endsWith(e)?n.slice(0,-e.length):n},"ne");var _=p((r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),"w"),O=Me(import.meta.url);const it=/^path$/i,Q={key:"PATH",value:""};function ge(r){for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||!it.test(e))continue;let t=r[e];return t?{key:e,value:t}:Q}return Q}f(ge,"pt");p(ge,"D");function we(r,e){let t=e.value.split(J),n=[],o=r,i;do n.push(We(o,"node_modules",".bin")),i=o,o=Xe(o);while(o!==i);let c=n.concat(t).join(J);return{key:e.key,value:c}}f(we,"ut");p(we,"O");function ve(r,e){let t={...process.env,...e},n=we(r,ge(t));return t[n.key]=n.value,t}f(ve,"ft");p(ve,"k");const at=p(r=>{let e=r.length,t=new ae,n=p(()=>{--e===0&&t.emit("end")},"r");for(let o of r)o.pipe(t,{end:!1}),o.on("end",n);return t},"A");var ct=_(((r,e)=>{e.exports=i,i.sync=c;var t=O("fs");function n(s,a){var l=a.pathExt===void 0?process.env.PATHEXT:a.pathExt;if(!l||(l=l.split(";"),l.indexOf("")!==-1))return!0;for(var u=0;u<l.length;u++){var h=l[u].toLowerCase();if(h&&s.substr(-h.length).toLowerCase()===h)return!0}return!1}f(n,"n"),p(n,"r");function o(s,a,l){return!s.isSymbolicLink()&&!s.isFile()?!1:n(a,l)}f(o,"s"),p(o,"i");function i(s,a,l){t.stat(s,function(u,h){l(u,u?!1:o(h,s,a))})}f(i,"i"),p(i,"a");function c(s,a){return o(t.statSync(s),s,a)}f(c,"c"),p(c,"o")})),lt=_(((r,e)=>{e.exports=n,n.sync=o;var t=O("fs");function n(s,a,l){t.stat(s,function(u,h){l(u,u?!1:i(h,a))})}f(n,"n"),p(n,"r");function o(s,a){return i(t.statSync(s),a)}f(o,"s"),p(o,"i");function i(s,a){return s.isFile()&&c(s,a)}f(i,"i"),p(i,"a");function c(s,a){var l=s.mode,u=s.uid,h=s.gid,d=a.uid===void 0?process.getuid&&process.getuid():a.uid,m=a.gid===void 0?process.getgid&&process.getgid():a.gid,g=64,v=8,E=1,S=g|v;return l&E||l&v&&h===m||l&g&&u===d||l&S&&d===0}f(c,"c"),p(c,"o")})),ut=_(((r,e)=>{O("fs");var t=process.platform==="win32"||global.TESTING_WINDOWS?ct():lt();e.exports=n,n.sync=o;function n(i,c,s){if(typeof c=="function"&&(s=c,c={}),!s){if(typeof Promise!="function")throw TypeError("callback not provided");return new Promise(function(a,l){n(i,c||{},function(u,h){u?l(u):a(h)})})}t(i,c||{},function(a,l){a&&(a.code==="EACCES"||c&&c.ignoreErrors)&&(a=null,l=!1),s(a,l)})}f(n,"n"),p(n,"r");function o(i,c){try{return t.sync(i,c||{})}catch(s){if(c&&c.ignoreErrors||s.code==="EACCES")return!1;throw s}}f(o,"s"),p(o,"i")})),pt=_(((r,e)=>{let t=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",n=O("path"),o=t?";":":",i=ut(),c=p(l=>Object.assign(Error(`not found: ${l}`),{code:"ENOENT"}),"o"),s=p((l,u)=>{let h=u.colon||o,d=l.match(/\//)||t&&l.match(/\\/)?[""]:[...t?[process.cwd()]:[],...(u.path||process.env.PATH||"").split(h)],m=t?u.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",g=t?m.split(h):[""];return t&&l.indexOf(".")!==-1&&g[0]!==""&&g.unshift(""),{pathEnv:d,pathExt:g,pathExtExe:m}},"s"),a=p((l,u,h)=>{typeof u=="function"&&(h=u,u={}),u||={};let{pathEnv:d,pathExt:m,pathExtExe:g}=s(l,u),v=[],E=p(b=>new Promise((A,T)=>{if(b===d.length)return u.all&&v.length?A(v):T(c(l));let y=d[b],G=/^".*"$/.test(y)?y.slice(1,-1):y,P=n.join(G,l);A(S(!G&&/^\.[\\\/]/.test(l)?l.slice(0,2)+P:P,b,0))}),"d"),S=p((b,A,T)=>new Promise((y,G)=>{if(T===m.length)return y(E(A+1));let P=m[T];i(b+P,{pathExt:g},(ze,Ie)=>{if(!ze&&Ie)if(u.all)v.push(b+P);else return y(b+P);return y(S(b,A,T+1))})}),"f");return h?E(0).then(b=>h(null,b),h):E(0)},"c");e.exports=a,a.sync=(l,u)=>{u||={};let{pathEnv:h,pathExt:d,pathExtExe:m}=s(l,u),g=[];for(let v=0;v<h.length;v++){let E=h[v],S=/^".*"$/.test(E)?E.slice(1,-1):E,b=n.join(S,l),A=!S&&/^\.[\\\/]/.test(l)?l.slice(0,2)+b:b;for(let T=0;T<d.length;T++){let y=A+d[T];try{if(i.sync(y,{pathExt:m}))if(u.all)g.push(y);else return y}catch{}}}if(u.all&&g.length)return g;if(u.nothrow)return null;throw c(l)}})),dt=_(((r,e)=>{let t=p((n={})=>{let o=n.env||process.env;return(n.platform||process.platform)==="win32"?Object.keys(o).reverse().find(i=>i.toUpperCase()==="PATH")||"Path":"PATH"},"n");e.exports=t,e.exports.default=t})),ht=_(((r,e)=>{let t=O("path"),n=pt(),o=dt();function i(s,a){let l=s.options.env||process.env,u=process.cwd(),h=s.options.cwd!=null,d=h&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(s.options.cwd)}catch{}let m;try{m=n.sync(s.command,{path:l[o({env:l})],pathExt:a?t.delimiter:void 0})}catch{}finally{d&&process.chdir(u)}return m&&=t.resolve(h?s.options.cwd:"",m),m}f(i,"i"),p(i,"a");function c(s){return i(s)||i(s,!0)}f(c,"c"),p(c,"o"),e.exports=c})),ft=_(((r,e)=>{let t=/([()\][%!^"`<>&|;, *?])/g;function n(i){return i=i.replace(t,"^$1"),i}f(n,"n"),p(n,"r");function o(i,c){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(t,"^$1"),c&&(i=i.replace(t,"^$1")),i}f(o,"s"),p(o,"i"),e.exports.command=n,e.exports.argument=o})),mt=_(((r,e)=>{e.exports=/^#!(.*)/})),gt=_(((r,e)=>{let t=mt();e.exports=(n="")=>{let o=n.match(t);if(!o)return null;let[i,c]=o[0].replace(/#! ?/,"").split(" "),s=i.split("/").pop();return s==="env"?c:c?`${s} ${c}`:s}})),wt=_(((r,e)=>{let t=O("fs"),n=gt();function o(i){let c=Buffer.alloc(150),s;try{s=t.openSync(i,"r"),t.readSync(s,c,0,150,0),t.closeSync(s)}catch{}return n(c.toString())}f(o,"s"),p(o,"i"),e.exports=o})),vt=_(((r,e)=>{let t=O("path"),n=ht(),o=ft(),i=wt(),c=process.platform==="win32",s=/\.(?:com|exe)$/i,a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(d){d.file=n(d);let m=d.file&&i(d.file);return m?(d.args.unshift(d.file),d.command=m,n(d)):d.file}f(l,"p"),p(l,"l");function u(d){if(!c)return d;let m=l(d),g=!s.test(m);if(d.options.forceShell||g){let v=a.test(m);d.command=t.normalize(d.command),d.command=o.command(d.command),d.args=d.args.map(E=>o.argument(E,v)),d.args=["/d","/s","/c",`"${[d.command].concat(d.args).join(" ")}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=!0}return d}f(u,"u"),p(u,"u");function h(d,m,g){m&&!Array.isArray(m)&&(g=m,m=null),m=m?m.slice(0):[],g=Object.assign({},g);let v={command:d,args:m,options:g,file:void 0,original:{command:d,args:m}};return g.shell?v:u(v)}f(h,"d"),p(h,"d"),e.exports=h})),$t=_(((r,e)=>{let t=process.platform==="win32";function n(s,a){return Object.assign(Error(`${a} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${a} ${s.command}`,path:s.command,spawnargs:s.args})}f(n,"n"),p(n,"r");function o(s,a){if(!t)return;let l=s.emit;s.emit=function(u,h){if(u==="exit"){let d=i(h,a);if(d)return l.call(s,"error",d)}return l.apply(s,arguments)}}f(o,"s"),p(o,"i");function i(s,a){return t&&s===1&&!a.file?n(a.original,"spawn"):null}f(i,"i"),p(i,"a");function c(s,a){return t&&s===1&&!a.file?n(a.original,"spawnSync"):null}f(c,"c"),p(c,"o"),e.exports={hookChildProcess:o,verifyENOENT:i,verifyENOENTSync:c,notFoundError:n}})),bt=_(((r,e)=>{let t=O("child_process"),n=vt(),o=$t();function i(s,a,l){let u=n(s,a,l),h=t.spawn(u.command,u.args,u.options);return o.hookChildProcess(h,u),h}f(i,"i"),p(i,"a");function c(s,a,l){let u=n(s,a,l),h=t.spawnSync(u.command,u.args,u.options);return h.error=h.error||o.verifyENOENTSync(h.status,u),h}f(c,"c"),p(c,"o"),e.exports=i,e.exports.spawn=i,e.exports.sync=c,e.exports._parse=n,e.exports._enoent=o}))(),ee=class extends Error{static{f(this,"L")}static{p(this,"U")}result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(r,e){super(`Process exited with non-zero status (${r.exitCode})`),this.result=r,this.output=e}};const _t={timeout:void 0,persist:!1},Et={windowsHide:!0};function $e(r,e){return{command:qe(r),args:e??[]}}f($e,"Pt");p($e,"K");function be(r){let e=new AbortController;for(let t of r){if(t.aborted)return e.abort(),t;t.addEventListener("abort",()=>{e.abort(t.reason)},{signal:e.signal})}return e.signal}f(be,"Tt");p(be,"q");async function B(r){let e="";for await(let t of r)e+=t.toString();return e}f(B,"H");p(B,"J");var yt=class{static{f(this,"At")}static{p(this,"Y")}_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(r,e,t){this._options={..._t,...t},this._command=r,this._args=e??[],this._processClosed=new Promise(n=>{this._resolveClose=n})}kill(r){return this._process?.kill(r)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(r,e,t){return xt(r,e,{...t,stdin:this})}async*[Symbol.asyncIterator](){let r=this._process;if(!r)return;let e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);let t=at(e),n=Ye.createInterface({input:t});for await(let o of n)yield o.toString();if(await this._processClosed,r.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new ee(this)}async _waitForOutput(){let r=this._process;if(!r)throw Error("No process was started");let[e,t]=await Promise.all([this._streamOut?B(this._streamOut):"",this._streamErr?B(this._streamErr):""]);if(await this._processClosed,this._options?.stdin&&await this._options.stdin,r.removeAllListeners(),this._thrownError)throw this._thrownError;let n={stderr:t,stdout:e,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new ee(this,n);return n}then(r,e){return this._waitForOutput().then(r,e)}_streamOut;_streamErr;spawn(){let r=Je(),e=this._options,t={...Et,...e.nodeOptions},n=[];this._resetState(),e.timeout!==void 0&&n.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&n.push(e.signal),e.persist===!0&&(t.detached=!0),n.length>0&&(t.signal=be(n)),t.env=ve(r,t.env);let{command:o,args:i}=$e(this._command,this._args),c=(0,bt._parse)(o,i,t),s=ce(c.command,c.args,c.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once("error",this._onError),s.once("close",this._onClose),e.stdin!==void 0&&s.stdin&&e.stdin.process){let{stdout:a}=e.stdin.process;a&&a.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(r=>{this._resolveClose=r}),this._thrownError=void 0}_onError=p(r=>{if(r.name==="AbortError"&&(!(r.cause instanceof Error)||r.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=r},"_onError");_onClose=p(()=>{this._resolveClose&&this._resolveClose()},"_onClose")};const U=p((r,e,t)=>{let n=new yt(r,e,t);return n.spawn(),n},"X"),xt=U;var kt=tt({detectPackageManager:p(()=>W,"detectPackageManager"),installDependencies:p(()=>Te,"installDependencies"),packageManagers:p(()=>j,"packageManagers")});async function _e(r,e,t={}){let n=pe(r).split("/");for(;n.length>0;){let o=await e(n.join("/")||"/");if(o||!t.includeParentDirs)return o;n.pop()}}f(_e,"Mt");p(_e,"se");function Ee(r){let e;return()=>(e===void 0&&(e=r().then(t=>(e=t,e))),e)}f(Ee,"zt");p(Ee,"ce");const Tt=Ee(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:r}=await U("corepack",["--version"]);return r===0}catch{return!1}});async function ye(r,e,t={}){let n=r!=="npm"&&r!=="bun"&&r!=="deno"&&t.corepack!==!1&&await Tt()?["corepack",[r,...e]]:[r,e],{exitCode:o,stdout:i,stderr:c}=await U(n[0],n[1],{nodeOptions:{cwd:$(t.cwd||process.cwd()),env:t.env,stdio:t.silent?"pipe":"inherit"}});if(o!==0)throw Error(`\`${n.flat().join(" ")}\` failed.${t.silent?["",i,c].join(`
2
+ `):""}`)}f(ye,"Lt");p(ye,"le");async function xe(r={}){let e=r.cwd||process.cwd(),t={...process.env,...r.env},n=(typeof r.packageManager=="string"?j.find(o=>o.name===r.packageManager):r.packageManager)||await W(r.cwd||process.cwd());if(!n)throw Error("No package manager auto-detected.");return{cwd:e,env:t,silent:r.silent??!1,packageManager:n,dev:r.dev??!1,workspace:r.workspace,global:r.global??!1,dry:r.dry??!1,corepack:r.corepack??!0}}f(xe,"Ht");p(xe,"ue");function ke(r){let[e,t]=(r||"").split("@"),[n,o]=t?.split("+")||[];if(e&&e!=="-"&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(e))return{name:e,version:n,buildMeta:o};let i=(e||"").replace(/\W+/g,"");return{name:i,version:n,buildMeta:o,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${e}\` to \`${i}\``]}}f(ke,"Dt");p(ke,"de");const j=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function W(r,e={}){let t=await _e($(r||"."),async n=>{if(!e.ignorePackageJSON){let o=K(n,"package.json");if(x(o)){let i=JSON.parse(await ie(o,"utf8"));if(i?.packageManager){let{name:c,version:s="0.0.0",buildMeta:a,warnings:l}=ke(i.packageManager);if(c){let u=s.split(".")[0],h=j.find(d=>d.name===c&&d.majorVersion===u)||j.find(d=>d.name===c);return{name:c,command:c,version:s,majorVersion:u,buildMeta:a,warnings:l,files:h?.files,lockFile:h?.lockFile}}}}if(x(K(n,"deno.json")))return j.find(i=>i.name==="deno")}if(!e.ignoreLockFile){for(let o of j)if([o.lockFile,o.files].flat().filter(Boolean).some(i=>x($(n,i))))return{...o}}},{includeParentDirs:e.includeParentDirs??!0});if(!t&&!e.ignoreArgv){let n=process.argv[1];if(n){for(let o of j)if(RegExp(`[/\\\\]\\.?${o.command}`).test(n))return o}}return t}f(W,"Z$1");p(W,"$");async function Te(r={}){let e=await xe(r),t=r.frozenLockFile?{npm:["ci"],yarn:["install","--immutable"],bun:["install","--frozen-lockfile"],pnpm:["install","--frozen-lockfile"],deno:["install","--frozen"]}[e.packageManager.name]:["install"];return r.ignoreWorkspace&&e.packageManager.name==="pnpm"&&t.push("--ignore-workspace"),e.dry||await ye(e.packageManager.command,t,{cwd:e.cwd,silent:e.silent,corepack:e.corepack}),{exec:{command:e.packageManager.command,args:t}}}f(Te,"It");p(Te,"fe");const Ct=Object.defineProperty({__proto__:null,a:$,i:he,n:me,r:fe,t:kt},Symbol.toStringTag,{value:"Module"});var Ot=Object.defineProperty,w=f((r,e)=>Ot(r,"name",{value:e,configurable:!0}),"o");async function Ce(r,e,t={}){const n=e+".json",o=JSON.parse(await ie(n,"utf8").catch(()=>"{}")),i=(await I(r,{method:"HEAD",headers:t.headers}).catch(()=>{}))?.headers.get("etag");if(o.etag===i&&x(e))return;typeof i=="string"&&(o.etag=i);const c=await I(r,{headers:t.headers});if(c.status>=400)throw new Error(`Failed to download ${r}: ${c.status} ${c.statusText}`);const s=se(e);await Ke(Re)(c.body,s),await Be(n,JSON.stringify(o),"utf8")}f(Ce,"q");w(Ce,"download");const St=/^(?<repo>[-\w.]+\/[-\w.]+)(?<subdir>[^#]+)?(?<ref>#[-\w./@]+)?/,At=/^(?<repo>[-\w.]+(?:\/[-\w.]+)+?)(?:::(?<subdir>[^#]*))?(?<ref>#[-\w./@]+)?$/;function N(r,e){const t=e?.expandRepo||r.includes("::"),n=r.match(t?At:St)?.groups||{},o=t?n.subdir?"/"+n.subdir:"/":n.subdir||"/";return{repo:n.repo||"",subdir:o,ref:n.ref?n.ref.slice(1):"main"}}f(N,"x");w(N,"parseGitURI");function C(...r){process.env.DEBUG&&console.debug("[giget]",...r)}f(C,"$");w(C,"debug");async function I(r,e={}){e.headers?.["sec-fetch-mode"]&&(e.mode=e.headers["sec-fetch-mode"]);const t=await fetch(r,{...e,headers:X(e.headers)}).catch(n=>{throw new Error(`Failed to download ${r}: ${n}`,{cause:n})});if(e.validateStatus&&t.status>=400)throw new Error(`Failed to fetch ${r}: ${t.status} ${t.statusText}`);return t}f(I,"v");w(I,"sendFetch");function Oe(){const r=process.env.XDG_CACHE_HOME?$(process.env.XDG_CACHE_HOME,"giget"):$(Ve(),".cache/giget");if(process.platform==="win32"){const e=$(le(),"giget");if(!x(e)&&x(r))try{He(r,e)}catch{}return e}return r}f(Oe,"ee");w(Oe,"cacheDirectory");function X(r={}){const e={};for(const[t,n]of Object.entries(r))n&&(e[t.toLowerCase()]=n);return e}f(X,"F");w(X,"normalizeHeaders");function Se(){return process.env.SHELL?process.env.SHELL:process.platform==="win32"?"cmd.exe":"/bin/bash"}f(Se,"te");w(Se,"currentShell");function jt(r){r=$(r);const e=Se();console.info(`(experimental) Opening shell in ${he(process.cwd(),r)}...`),Ue(e,[],{cwd:r,shell:!0,stdio:"inherit"})}f(jt,"re");w(jt,"startShell");const Pt=w((r,e)=>{const t=Ae(r);return{name:t.name,version:t.subdir?`${t.version||"default"}-${t.subdir.replaceAll("/","-")}`:t.version,tar:w(({auth:n}={})=>je(t,n??e.auth),"tar")}},"git");function Ae(r,e={}){const t=e.cwd??process.cwd();let n=r.replace(/#.*$/,""),o;if(/^[./]/.test(r))n=$(t,n);else if(/^https?:\/\//.test(n)){const u=/^(https?:\/\/[^/]+)\/([\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(u){const[,h,d,m]=u;n=`${h}/${d}`,m&&(o=m)}}else if(n.includes("@")){const u=/^(.*?:[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(u){const[,h,d]=u;n=h,d&&(o=d)}}else{const u={"github:":"https://github.com/","gh:":"https://github.com/","gitlab:":"https://gitlab.com/","bitbucket:":"https://bitbucket.org/","sourcehut:":"https://git.sr.ht/~"},h=/^(.+?:)/.exec(n)?.at(1);h&&u[h]?n=n.replace(h,u[h]):h||(n=`${(process.env.GIGET_GIT_HOST||"https://github.com/").replace(/\/$/,"")}/${n}`);const d=/^(https?:\/\/[^/]+\/~?[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(d){const[,m,g]=d;n=m,g&&(o=g)}}const i=n.replace(/^https?:\/\//,"").replace(/^.+@/,"").replace(/(\.git)?(#.*)?$/,"").replace(/^\W+/,"").replaceAll(/[:/]/g,"-"),[c,s]=/#(.+)$/.exec(r)?.at(1)?.split(":")??[],a=c||void 0,l=s||o;return{uri:n,name:i,...a&&{version:a},...l&&{subdir:l}}}f(Ae,"ie");w(Ae,"parseGitCloneURI");async function je(r,e){const t=await Le(Y(le(),"giget-git-"));if(e&&/[\r\n]/.test(e))throw new Error("Auth token must not contain newline characters");const n={...process.env,GIT_TERMINAL_PROMPT:"0"};e&&(n.GIT_CONFIG_COUNT="1",n.GIT_CONFIG_KEY_0="http.extraHeader",n.GIT_CONFIG_VALUE_0=`Authorization: Bearer ${e}`);const o={env:n,timeout:6e4},i=Pe(),c=w(a=>L(a,o,i),"gitExec"),s=w(a=>L(a,{...o,cwd:t},i),"gitExecIn");try{const a=["clone","--progress","--depth","1"];r.subdir&&a.push("--filter=blob:none","--sparse","--no-checkout"),r.version&&a.push("--branch",r.version),a.push("--",r.uri,t);try{i.update("Cloning..."),await c(a),i.update("Cloned.")}catch(g){if(!r.version)throw g;C("Shallow clone failed, falling back to full clone:",g),i.update("Shallow clone failed, cloning..."),await M(t,{recursive:!0,force:!0}),await H(t,{recursive:!0}),await s(["init"]),await s(["remote","add","origin",r.uri]),await s(["fetch","origin"]),await s(["checkout",r.version]),i.update("Fetched.")}r.subdir&&(i.update(`Sparse checkout ${r.subdir}...`),await s(["sparse-checkout","set",r.subdir]),await s(["checkout"])),i.update("Packing...");const l=r.subdir?Y(t,r.subdir):t,{create:u}=await import("../packem_chunks/tar.js").then(g=>g.t);i.done();const h=u({gzip:!0,cwd:l,filter:w(g=>!g.startsWith(".git/")&&g!==".git"&&!g.startsWith("./.git/")&&g!=="./.git","filter")},["."]).pipe(new ae);let d=!1;const m=w(()=>{d||(d=!0,M(t,{recursive:!0,force:!0}))},"cleanup");return h.on("end",m),h.on("error",m),h.on("close",m),h}catch(a){throw i.done(),await M(t,{recursive:!0,force:!0}),a}}f(je,"se");w(je,"_cloneAndTar");const te=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];function L(r,e,t){return new Promise((n,o)=>{const i=ce("git",r,{...e,stdio:["ignore","pipe","pipe"]});i.stdout.resume();let c="";i.stderr?.on("data",s=>{const a=s.toString();for(const l of a.split(/[\r\n]/)){const u=l.trim();u&&(c=u)}t&&t.update(c)}),i.on("close",s=>{s===0?n(c):o(new Error(`git ${r[0]} exited with code ${s}. Is git installed?`))}),i.on("error",s=>{s.code==="ENOENT"?o(new Error("git is not installed or not found in PATH")):o(s)})})}f(L,"G");w(L,"_gitSpawn");function Pe(){if(!process.stderr.isTTY)return{update(o){},done(){}};let r="",e=0;const t=w(()=>{const o=te[e%te.length];e++,process.stderr.write(`\x1B[2K\r\x1B[2m${o} ${r}\x1B[0m`)},"render"),n=setInterval(t,80);return{update(o){r=o,t()},done(){clearInterval(n),process.stderr.write("\x1B[2K\r")}}}f(Pe,"ne");w(Pe,"_createStatus");const re=w(async(r,e)=>{if(r.endsWith(".json"))return await ne(r,e);const t=new URL(r);let n=me(t.pathname);try{const o=await I(t.href,{method:"HEAD",validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if((o.headers.get("content-type")||"").includes("application/json"))return await ne(r,e);const i=o.headers.get("content-disposition")?.match(/filename="?(.+)"?/)?.[1];i&&(n=i.split(".")[0])}catch(o){C(`Failed to fetch HEAD for ${t.href}:`,o)}return{name:`${n}-${t.href.slice(0,8)}`,version:"",subdir:"",tar:t.href,defaultDir:n,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0}}},"http"),ne=w(async(r,e)=>{const t=await(await I(r,{validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}})).json();if(!t.tar||!t.name)throw new Error(`Invalid template info from ${r}. name or tar fields are missing!`);return t},"_httpJSON"),oe=w((r,e)=>{const t=N(r),n=process.env.GIGET_GITHUB_URL||"https://api.github.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},url:`${n.replace("api.github.com","github.com")}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/repos/${t.repo}/tarball/${t.ref}`}},"github"),zt=w((r,e)=>{const t=N(r,{expandRepo:!0}),n=process.env.GIGET_GITLAB_URL||"https://gitlab.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0,"sec-fetch-mode":"same-origin"},url:`${n}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/${t.repo}/-/archive/${t.ref}.tar.gz`}},"gitlab"),It=w((r,e)=>{const t=N(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://bitbucket.com/${t.repo}/src/${t.ref}${t.subdir}`,tar:`https://bitbucket.org/${t.repo}/get/${t.ref}.tar.gz`}},"bitbucket"),Dt=w((r,e)=>{const t=N(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://git.sr.ht/~${t.repo}/tree/${t.ref}/item${t.subdir}`,tar:`https://git.sr.ht/~${t.repo}/archive/${t.ref}.tar.gz`}},"sourcehut"),Ft={http:re,https:re,git:Pt,github:oe,gh:oe,gitlab:zt,bitbucket:It,sourcehut:Dt},Nt="https://raw.githubusercontent.com/unjs/giget/main/templates",Mt=w((r=Nt,e={})=>(async t=>{const n=Date.now(),o=`${r}/${t}.json`,i=await I(o,{headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if(i.status>=400)throw new Error(`Failed to download ${t} template info from ${o}: ${i.status} ${i.statusText}`);const c=await i.json();if(!c.tar||!c.name)throw new Error(`Invalid template info from ${o}. name or tar fields are missing!`);return C(`Fetched ${t} template info from ${o} in ${Date.now()-n}ms`),c}),"registryProvider"),Gt=/^([\w+-.]+):/;async function Ht(r,e={}){e.registry=process.env.GIGET_REGISTRY??e.registry,e.auth=process.env.GIGET_AUTH??e.auth;const t=e.registry===!1?void 0:Mt(e.registry,{auth:e.auth});let n=e.provider||(t?"registry":"github"),o=r;const i=r.match(Gt);i&&(n=i[1],o=r.slice(i[0].length),(n==="http"||n==="https")&&(o=r)),n.endsWith("+git")&&(o=`${n.slice(0,-4)}:${o}`,n="git");const c=e.providers?.[n]||Ft[n]||t;if(!c)throw new Error(`Unsupported provider: ${n}`);const s=await Promise.resolve().then(()=>c(o,{auth:e.auth})).catch(m=>{throw new Error(`Failed to download template from ${n}: ${m.message}`)});if(!s)throw new Error(`Failed to resolve template from ${n}`);s.name=(s.name||"template").replace(/[^\da-z-]/gi,"-"),s.defaultDir=(s.defaultDir||s.name).replace(/[^\da-z-]/gi,"-");const a=$($(Oe(),n,s.name),(s.version||s.name)+".tar.gz");if(e.preferOffline&&x(a)&&(e.offline=!0),!e.offline){await H(fe(a),{recursive:!0});const m=Date.now();if(typeof s.tar=="function"){const g=s.tar;await(async()=>{const v=await g({auth:e.auth});await Ze(v instanceof q?v:q.fromWeb(v),se(a))})().catch(v=>{if(!x(a))throw v;C("Download error. Using cached version:",v),e.offline=!0})}else await Ce(s.tar,a,{headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,...X(s.headers)}}).catch(g=>{if(!x(a))throw g;C("Download error. Using cached version:",g),e.offline=!0});C(`Downloaded to ${a} in ${Date.now()-m}ms`)}if(!x(a))throw new Error(`Tarball not found: ${a} (offline: ${e.offline})`);const l=$($(e.cwd||"."),e.dir||s.defaultDir);if(e.forceClean&&await M(l,{recursive:!0,force:!0}),!e.force&&x(l)&&Ge(l).length>0)throw new Error(`Destination ${l} already exists.`);await H(l,{recursive:!0});const u=Date.now(),h=s.subdir?.replace(/^\//,"")||"",{extract:d}=await import("../packem_chunks/tar.js").then(m=>m.t);if(await d({file:a,cwd:l,onReadEntry(m){m.path=m.path.split("/").splice(1).join("/"),h&&(m.path.startsWith(h+"/")?m.path=m.path.slice(h.length):m.path="")}}),C(`Extracted to ${l} in ${Date.now()-u}ms`),e.install){C("Installing dependencies...");const{installDependencies:m}=await Promise.resolve().then(()=>Ct).then(g=>g.t);await m({cwd:l,silent:e.silent,...typeof e.install=="object"?e.install:{}})}return{...s,source:o,dir:l}}f(Ht,"fe");w(Ht,"downloadTemplate");export{Ht as f,tt as p};