Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pigeon-posse/pigeonsh

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pigeon-posse/pigeonsh - npm Package Compare versions

Comparing version 0.8.4 to 0.9.0

6

data/hosts/main.js

@@ -9,5 +9,5 @@ #! /usr/bin/env node

import { Add } from './src/add.js'
import { Remove } from './src/remove.js'
import { List } from './src/list.js'
// import { Add } from './src/add.js'
// import { Remove } from './src/remove.js'
// import { List } from './src/list.js'

@@ -14,0 +14,0 @@ ( function() {

#! /usr/bin/env node
var er=(e=0)=>r=>`\x1B[${r+e}m`,rr=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,ir=(e=0)=>(r,i,n)=>`\x1B[${38+e};2;${r};${i};${n}m`,A={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},nr=Object.keys(A.modifier),Te=Object.keys(A.color),_e=Object.keys(A.bgColor),or=[...Te,..._e];function Ti(){let e=new Map;for(let[r,i]of Object.entries(A)){for(let[n,o]of Object.entries(i))A[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[n]=A[n],e.set(o[0],o[1]);Object.defineProperty(A,r,{value:i,enumerable:!1})}return Object.defineProperty(A,"codes",{value:e,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=er(),A.color.ansi256=rr(),A.color.ansi16m=ir(),A.bgColor.ansi=er(10),A.bgColor.ansi256=rr(10),A.bgColor.ansi16m=ir(10),Object.defineProperties(A,{rgbToAnsi256:{value(r,i,n){return r===i&&i===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(r){let i=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!i)return[0,0,0];let[n]=i;n.length===3&&(n=[...n].map(t=>t+t).join(""));let o=Number.parseInt(n,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:r=>A.rgbToAnsi256(...A.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let i,n,o;if(r>=232)i=((r-232)*10+8)/255,n=i,o=i;else{r-=16;let u=r%36;i=Math.floor(r/36)/5,n=Math.floor(u/6)/5,o=u%6/5}let t=Math.max(i,n,o)*2;if(t===0)return 30;let l=30+(Math.round(o)<<2|Math.round(n)<<1|Math.round(i));return t===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(r,i,n)=>A.ansi256ToAnsi(A.rgbToAnsi256(r,i,n)),enumerable:!1},hexToAnsi:{value:r=>A.ansi256ToAnsi(A.hexToAnsi256(r)),enumerable:!1}}),A}var _i=Ti(),k=_i;import Fe from"node:process";import Fi from"node:os";import lr from"node:tty";function _(e,r=globalThis.Deno?globalThis.Deno.args:Fe.argv){let i=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(i+e),o=r.indexOf("--");return n!==-1&&(o===-1||n<o)}var{env:v}=Fe,le;_("no-color")||_("no-colors")||_("color=false")||_("color=never")?le=0:(_("color")||_("colors")||_("color=true")||_("color=always"))&&(le=1);function ki(){if("FORCE_COLOR"in v)return v.FORCE_COLOR==="true"?1:v.FORCE_COLOR==="false"?0:v.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(v.FORCE_COLOR,10),3)}function Ni(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Li(e,{streamIsTTY:r,sniffFlags:i=!0}={}){let n=ki();n!==void 0&&(le=n);let o=i?le:n;if(o===0)return 0;if(i){if(_("color=16m")||_("color=full")||_("color=truecolor"))return 3;if(_("color=256"))return 2}if("TF_BUILD"in v&&"AGENT_NAME"in v)return 1;if(e&&!r&&o===void 0)return 0;let t=o||0;if(v.TERM==="dumb")return t;if(Fe.platform==="win32"){let l=Fi.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in v)return"GITHUB_ACTIONS"in v?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in v)||v.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in v)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0;if(v.COLORTERM==="truecolor"||v.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in v){let l=Number.parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(v.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)||"COLORTERM"in v?1:t}function tr(e,r={}){let i=Li(e,{streamIsTTY:e&&e.isTTY,...r});return Ni(i)}var Ii={stdout:tr({isTTY:lr.isatty(1)}),stderr:tr({isTTY:lr.isatty(2)})},ur=Ii;function cr(e,r,i){let n=e.indexOf(r);if(n===-1)return e;let o=r.length,t=0,l="";do l+=e.slice(t,n)+r+i,t=n+o,n=e.indexOf(r,t);while(n!==-1);return l+=e.slice(t),l}function sr(e,r,i,n){let o=0,t="";do{let l=e[n-1]==="\r";t+=e.slice(o,l?n-1:n)+r+(l?`\r
var ir=(e=0)=>r=>`\x1B[${r+e}m`,nr=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,or=(e=0)=>(r,i,n)=>`\x1B[${38+e};2;${r};${i};${n}m`,A={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},lr=Object.keys(A.modifier),Fe=Object.keys(A.color),ke=Object.keys(A.bgColor),tr=[...Fe,...ke];function Fi(){let e=new Map;for(let[r,i]of Object.entries(A)){for(let[n,o]of Object.entries(i))A[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[n]=A[n],e.set(o[0],o[1]);Object.defineProperty(A,r,{value:i,enumerable:!1})}return Object.defineProperty(A,"codes",{value:e,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=ir(),A.color.ansi256=nr(),A.color.ansi16m=or(),A.bgColor.ansi=ir(10),A.bgColor.ansi256=nr(10),A.bgColor.ansi16m=or(10),Object.defineProperties(A,{rgbToAnsi256:{value(r,i,n){return r===i&&i===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(r){let i=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!i)return[0,0,0];let[n]=i;n.length===3&&(n=[...n].map(t=>t+t).join(""));let o=Number.parseInt(n,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:r=>A.rgbToAnsi256(...A.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let i,n,o;if(r>=232)i=((r-232)*10+8)/255,n=i,o=i;else{r-=16;let u=r%36;i=Math.floor(r/36)/5,n=Math.floor(u/6)/5,o=u%6/5}let t=Math.max(i,n,o)*2;if(t===0)return 30;let l=30+(Math.round(o)<<2|Math.round(n)<<1|Math.round(i));return t===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(r,i,n)=>A.ansi256ToAnsi(A.rgbToAnsi256(r,i,n)),enumerable:!1},hexToAnsi:{value:r=>A.ansi256ToAnsi(A.hexToAnsi256(r)),enumerable:!1}}),A}var ki=Fi(),k=ki;import Ne from"node:process";import Ni from"node:os";import ur from"node:tty";function _(e,r=globalThis.Deno?globalThis.Deno.args:Ne.argv){let i=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(i+e),o=r.indexOf("--");return n!==-1&&(o===-1||n<o)}var{env:v}=Ne,te;_("no-color")||_("no-colors")||_("color=false")||_("color=never")?te=0:(_("color")||_("colors")||_("color=true")||_("color=always"))&&(te=1);function Li(){if("FORCE_COLOR"in v)return v.FORCE_COLOR==="true"?1:v.FORCE_COLOR==="false"?0:v.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(v.FORCE_COLOR,10),3)}function Ii(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ri(e,{streamIsTTY:r,sniffFlags:i=!0}={}){let n=Li();n!==void 0&&(te=n);let o=i?te:n;if(o===0)return 0;if(i){if(_("color=16m")||_("color=full")||_("color=truecolor"))return 3;if(_("color=256"))return 2}if("TF_BUILD"in v&&"AGENT_NAME"in v)return 1;if(e&&!r&&o===void 0)return 0;let t=o||0;if(v.TERM==="dumb")return t;if(Ne.platform==="win32"){let l=Ni.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in v)return"GITHUB_ACTIONS"in v?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in v)||v.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in v)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0;if(v.COLORTERM==="truecolor"||v.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in v){let l=Number.parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(v.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)||"COLORTERM"in v?1:t}function cr(e,r={}){let i=Ri(e,{streamIsTTY:e&&e.isTTY,...r});return Ii(i)}var Mi={stdout:cr({isTTY:ur.isatty(1)}),stderr:cr({isTTY:ur.isatty(2)})},sr=Mi;function ar(e,r,i){let n=e.indexOf(r);if(n===-1)return e;let o=r.length,t=0,l="";do l+=e.slice(t,n)+r+i,t=n+o,n=e.indexOf(r,t);while(n!==-1);return l+=e.slice(t),l}function fr(e,r,i,n){let o=0,t="";do{let l=e[n-1]==="\r";t+=e.slice(o,l?n-1:n)+r+(l?`\r
`:`
`)+i,o=n+1,n=e.indexOf(`
`,o)}while(n!==-1);return t+=e.slice(o),t}var{stdout:ar,stderr:fr}=ur,ke=Symbol("GENERATOR"),Y=Symbol("STYLER"),Z=Symbol("IS_EMPTY"),pr=["ansi","ansi","ansi256","ansi16m"],H=Object.create(null),Ri=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let i=ar?ar.level:0;e.level=r.level===void 0?i:r.level};var Mi=e=>{let r=(...i)=>i.join(" ");return Ri(r,e),Object.setPrototypeOf(r,z.prototype),r};function z(e){return Mi(e)}Object.setPrototypeOf(z.prototype,Function.prototype);for(let[e,r]of Object.entries(k))H[e]={get(){let i=te(this,Le(r.open,r.close,this[Y]),this[Z]);return Object.defineProperty(this,e,{value:i}),i}};H.visible={get(){let e=te(this,this[Y],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ne=(e,r,i,...n)=>e==="rgb"?r==="ansi16m"?k[i].ansi16m(...n):r==="ansi256"?k[i].ansi256(k.rgbToAnsi256(...n)):k[i].ansi(k.rgbToAnsi(...n)):e==="hex"?Ne("rgb",r,i,...k.hexToRgb(...n)):k[i][e](...n),Di=["rgb","hex","ansi256"];for(let e of Di){H[e]={get(){let{level:i}=this;return function(...n){let o=Le(Ne(e,pr[i],"color",...n),k.color.close,this[Y]);return te(this,o,this[Z])}}};let r="bg"+e[0].toUpperCase()+e.slice(1);H[r]={get(){let{level:i}=this;return function(...n){let o=Le(Ne(e,pr[i],"bgColor",...n),k.bgColor.close,this[Y]);return te(this,o,this[Z])}}}}var Bi=Object.defineProperties(()=>{},{...H,level:{enumerable:!0,get(){return this[ke].level},set(e){this[ke].level=e}}}),Le=(e,r,i)=>{let n,o;return i===void 0?(n=e,o=r):(n=i.openAll+e,o=r+i.closeAll),{open:e,close:r,openAll:n,closeAll:o,parent:i}},te=(e,r,i)=>{let n=(...o)=>Pi(n,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(n,Bi),n[ke]=e,n[Y]=r,n[Z]=i,n},Pi=(e,r)=>{if(e.level<=0||!r)return e[Z]?"":r;let i=e[Y];if(i===void 0)return r;let{openAll:n,closeAll:o}=i;if(r.includes("\x1B"))for(;i!==void 0;)r=cr(r,i.close,i.open),i=i.parent;let t=r.indexOf(`
`);return t!==-1&&(r=sr(r,o,n,t)),n+r+o};Object.defineProperties(z.prototype,H);var ji=z(),Sl=z({level:fr?fr.level:0});var Ie=ji;var L=(e,r)=>Ie[e](r),U=(e,r,i)=>Ie[e][r](i),Yi=e=>{console.table(e)},Hi=()=>`
`,J={dim:e=>L("dim",e),standard:e=>L("white",e),info:e=>L("gray",e),error:e=>L("red",e),warn:e=>L("yellow",e),success:e=>L("green",e),group:e=>L("cyan",e),title:e=>L("cyan",e),titleDim:e=>U("cyan","dim",e),infoLink:e=>U("gray","underline",e),infoBg:e=>U("black","bgGray",e),errorBg:e=>U("whiteBright","bgRed",e),successBg:e=>U("whiteBright","bgGreen",e),warnBg:e=>U("black","bgYellow",e),custom:(e,r)=>L(e,r),table:e=>Yi(e),blankLine:Hi()};var ue=(e,r,i)=>{let n,o;return o=e+"Bg",n=J[o](r),n+=" ",n+=J[e](i),n},G=(e,r)=>{let i;switch(e){case"error":i=ue(e," ERROR ",r);break;case"success":i=ue(e," SUCCESS ",r);break;case"info":i=ue(e," INFO ",r);break;case"warn":i=ue(e," WARNING ",r);break;default:i=r}return i},ce=(e,r)=>{let i="log";return(e=="error"||e=="warn")&&(i=e),console[i](G(e,r))},se=(e,r,i)=>{let n="log";(e=="error"||e=="warn")&&(n=e),console.group(G(e,r)),console[n](i),console.groupEnd()},B={standard:e=>console.log(e),error:e=>ce("error",e),warn:e=>ce("warn",e),info:e=>ce("info",e),success:e=>ce("success",e),throwError:e=>G("error",e),throwSuccess:e=>G("success",e),throwInfo:e=>G("info",e),throwWarn:e=>G("warn",e),groupSuccess:(e,r)=>se("success",e,r),groupInfo:(e,r)=>se("info",e,r),groupWarn:(e,r)=>se("warn",e,r),group:(e,r)=>se("",e,r),blankLine:()=>console.log()};import*as vi from"fs";var hr=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null;function Fr(e){return typeof e>"u"||e===null}function Ui(e){return typeof e=="object"&&e!==null}function Gi(e){return Array.isArray(e)?e:Fr(e)?[]:[e]}function $i(e,r){var i,n,o,t;if(r)for(t=Object.keys(r),i=0,n=t.length;i<n;i+=1)o=t[i],e[o]=r[o];return e}function Ki(e,r){var i="",n;for(n=0;n<r;n+=1)i+=e;return i}function Wi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var qi=Fr,Vi=Ui,Qi=Gi,Xi=Ki,Zi=Wi,zi=$i,C={isNothing:qi,isObject:Vi,toArray:Qi,repeat:Xi,isNegativeZero:Zi,extend:zi};function kr(e,r){var i="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=`
`,o)}while(n!==-1);return t+=e.slice(o),t}var{stdout:pr,stderr:hr}=sr,Le=Symbol("GENERATOR"),Y=Symbol("STYLER"),z=Symbol("IS_EMPTY"),dr=["ansi","ansi","ansi256","ansi16m"],H=Object.create(null),Di=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let i=pr?pr.level:0;e.level=r.level===void 0?i:r.level};var Bi=e=>{let r=(...i)=>i.join(" ");return Di(r,e),Object.setPrototypeOf(r,J.prototype),r};function J(e){return Bi(e)}Object.setPrototypeOf(J.prototype,Function.prototype);for(let[e,r]of Object.entries(k))H[e]={get(){let i=ue(this,Re(r.open,r.close,this[Y]),this[z]);return Object.defineProperty(this,e,{value:i}),i}};H.visible={get(){let e=ue(this,this[Y],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ie=(e,r,i,...n)=>e==="rgb"?r==="ansi16m"?k[i].ansi16m(...n):r==="ansi256"?k[i].ansi256(k.rgbToAnsi256(...n)):k[i].ansi(k.rgbToAnsi(...n)):e==="hex"?Ie("rgb",r,i,...k.hexToRgb(...n)):k[i][e](...n),Pi=["rgb","hex","ansi256"];for(let e of Pi){H[e]={get(){let{level:i}=this;return function(...n){let o=Re(Ie(e,dr[i],"color",...n),k.color.close,this[Y]);return ue(this,o,this[z])}}};let r="bg"+e[0].toUpperCase()+e.slice(1);H[r]={get(){let{level:i}=this;return function(...n){let o=Re(Ie(e,dr[i],"bgColor",...n),k.bgColor.close,this[Y]);return ue(this,o,this[z])}}}}var ji=Object.defineProperties(()=>{},{...H,level:{enumerable:!0,get(){return this[Le].level},set(e){this[Le].level=e}}}),Re=(e,r,i)=>{let n,o;return i===void 0?(n=e,o=r):(n=i.openAll+e,o=r+i.closeAll),{open:e,close:r,openAll:n,closeAll:o,parent:i}},ue=(e,r,i)=>{let n=(...o)=>Yi(n,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(n,ji),n[Le]=e,n[Y]=r,n[z]=i,n},Yi=(e,r)=>{if(e.level<=0||!r)return e[z]?"":r;let i=e[Y];if(i===void 0)return r;let{openAll:n,closeAll:o}=i;if(r.includes("\x1B"))for(;i!==void 0;)r=ar(r,i.close,i.open),i=i.parent;let t=r.indexOf(`
`);return t!==-1&&(r=fr(r,o,n,t)),n+r+o};Object.defineProperties(J.prototype,H);var Hi=J(),Ol=J({level:hr?hr.level:0});var Me=Hi;var L=(e,r)=>Me[e](r),U=(e,r,i)=>Me[e][r](i),Ui=e=>{console.table(e)},Gi=()=>`
`,ee={dim:e=>L("dim",e),standard:e=>L("white",e),info:e=>L("gray",e),error:e=>L("red",e),warn:e=>L("yellow",e),success:e=>L("green",e),group:e=>L("cyan",e),title:e=>L("cyan",e),titleDim:e=>U("cyan","dim",e),infoLink:e=>U("gray","underline",e),infoBg:e=>U("black","bgGray",e),errorBg:e=>U("whiteBright","bgRed",e),successBg:e=>U("whiteBright","bgGreen",e),warnBg:e=>U("black","bgYellow",e),custom:(e,r)=>L(e,r),table:e=>Ui(e),blankLine:Gi()};var ce=(e,r,i)=>{let n,o;return o=e+"Bg",n=ee[o](r),n+=" ",n+=ee[e](i),n},G=(e,r)=>{let i;switch(e){case"error":i=ce(e," ERROR ",r);break;case"success":i=ce(e," SUCCESS ",r);break;case"info":i=ce(e," INFO ",r);break;case"warn":i=ce(e," WARNING ",r);break;default:i=r}return i},se=(e,r)=>{let i="log";return(e=="error"||e=="warn")&&(i=e),console[i](G(e,r))},ae=(e,r,i)=>{let n="log";(e=="error"||e=="warn")&&(n=e),console.group(G(e,r)),console[n](i),console.groupEnd()},$={standard:e=>console.log(e),error:e=>se("error",e),warn:e=>se("warn",e),info:e=>se("info",e),success:e=>se("success",e),throwError:e=>G("error",e),throwSuccess:e=>G("success",e),throwInfo:e=>G("info",e),throwWarn:e=>G("warn",e),groupSuccess:(e,r)=>ae("success",e,r),groupInfo:(e,r)=>ae("info",e,r),groupWarn:(e,r)=>ae("warn",e,r),group:(e,r)=>ae("",e,r),blankLine:()=>console.log()};import*as bi from"fs";import $i from"os";var De=()=>$i.platform()==="win32",R=e=>(De()&&(e=e.startsWith("/")?e.substring(1):e),e);var mr=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null;function Nr(e){return typeof e>"u"||e===null}function Ki(e){return typeof e=="object"&&e!==null}function Wi(e){return Array.isArray(e)?e:Nr(e)?[]:[e]}function qi(e,r){var i,n,o,t;if(r)for(t=Object.keys(r),i=0,n=t.length;i<n;i+=1)o=t[i],e[o]=r[o];return e}function Vi(e,r){var i="",n;for(n=0;n<r;n+=1)i+=e;return i}function Qi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Xi=Nr,Zi=Ki,zi=Wi,Ji=Vi,en=Qi,rn=qi,C={isNothing:Xi,isObject:Zi,toArray:zi,repeat:Ji,isNegativeZero:en,extend:rn};function Lr(e,r){var i="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=`
`+e.mark.snippet),n+" "+i):n}function re(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=kr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}re.prototype=Object.create(Error.prototype);re.prototype.constructor=re;re.prototype.toString=function(r){return this.name+": "+kr(this,r)};var w=re;function Re(e,r,i,n,o){var t="",l="",u=Math.floor(o/2)-1;return n-r>u&&(t=" ... ",r=n-u+t.length),i-n>u&&(l=" ...",i=n+u-l.length),{str:t+e.slice(r,i).replace(/\t/g,"\u2192")+l,pos:n-r+t.length}}function Me(e,r){return C.repeat(" ",r-e.length)+e}function Ji(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,n=[0],o=[],t,l=-1;t=i.exec(e.buffer);)o.push(t.index),n.push(t.index+t[0].length),e.position<=t.index&&l<0&&(l=n.length-2);l<0&&(l=n.length-1);var u="",c,s,f=Math.min(e.line+r.linesAfter,o.length).toString().length,a=r.maxLength-(r.indent+f+3);for(c=1;c<=r.linesBefore&&!(l-c<0);c++)s=Re(e.buffer,n[l-c],o[l-c],e.position-(n[l]-n[l-c]),a),u=C.repeat(" ",r.indent)+Me((e.line-c+1).toString(),f)+" | "+s.str+`
`+u;for(s=Re(e.buffer,n[l],o[l],e.position,a),u+=C.repeat(" ",r.indent)+Me((e.line+1).toString(),f)+" | "+s.str+`
`+e.mark.snippet),n+" "+i):n}function ie(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=Lr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ie.prototype=Object.create(Error.prototype);ie.prototype.constructor=ie;ie.prototype.toString=function(r){return this.name+": "+Lr(this,r)};var E=ie;function Be(e,r,i,n,o){var t="",l="",u=Math.floor(o/2)-1;return n-r>u&&(t=" ... ",r=n-u+t.length),i-n>u&&(l=" ...",i=n+u-l.length),{str:t+e.slice(r,i).replace(/\t/g,"\u2192")+l,pos:n-r+t.length}}function Pe(e,r){return C.repeat(" ",r-e.length)+e}function nn(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,n=[0],o=[],t,l=-1;t=i.exec(e.buffer);)o.push(t.index),n.push(t.index+t[0].length),e.position<=t.index&&l<0&&(l=n.length-2);l<0&&(l=n.length-1);var u="",c,s,f=Math.min(e.line+r.linesAfter,o.length).toString().length,a=r.maxLength-(r.indent+f+3);for(c=1;c<=r.linesBefore&&!(l-c<0);c++)s=Be(e.buffer,n[l-c],o[l-c],e.position-(n[l]-n[l-c]),a),u=C.repeat(" ",r.indent)+Pe((e.line-c+1).toString(),f)+" | "+s.str+`
`+u;for(s=Be(e.buffer,n[l],o[l],e.position,a),u+=C.repeat(" ",r.indent)+Pe((e.line+1).toString(),f)+" | "+s.str+`
`,u+=C.repeat("-",r.indent+f+3+s.pos)+`^
`,c=1;c<=r.linesAfter&&!(l+c>=o.length);c++)s=Re(e.buffer,n[l+c],o[l+c],e.position-(n[l]-n[l+c]),a),u+=C.repeat(" ",r.indent)+Me((e.line+c+1).toString(),f)+" | "+s.str+`
`;return u.replace(/\n$/,"")}var en=Ji,rn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],nn=["scalar","sequence","mapping"];function on(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){r[String(n)]=i})}),r}function ln(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(rn.indexOf(i)===-1)throw new w('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=on(r.styleAliases||null),nn.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var S=ln;function dr(e,r){var i=[];return e[r].forEach(function(n){var o=i.length;i.forEach(function(t,l){t.tag===n.tag&&t.kind===n.kind&&t.multi===n.multi&&(o=l)}),i[o]=n}),i}function tn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(n);return e}function Be(e){return this.extend(e)}Be.prototype.extend=function(r){var i=[],n=[];if(r instanceof S)n.push(r);else if(Array.isArray(r))n=n.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(n=n.concat(r.explicit));else throw new w("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(t){if(!(t instanceof S))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&t.loadKind!=="scalar")throw new w("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new w("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof S))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Be.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=dr(o,"implicit"),o.compiledExplicit=dr(o,"explicit"),o.compiledTypeMap=tn(o.compiledImplicit,o.compiledExplicit),o};var Nr=Be,Lr=new S("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ir=new S("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Rr=new S("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mr=new Nr({explicit:[Lr,Ir,Rr]});function un(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function cn(){return null}function sn(e){return e===null}var Dr=new S("tag:yaml.org,2002:null",{kind:"scalar",resolve:un,construct:cn,predicate:sn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function an(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function fn(e){return e==="true"||e==="True"||e==="TRUE"}function pn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Br=new S("tag:yaml.org,2002:bool",{kind:"scalar",resolve:an,construct:fn,predicate:pn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function hn(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function dn(e){return 48<=e&&e<=55}function mn(e){return 48<=e&&e<=57}function gn(e){if(e===null)return!1;var r=e.length,i=0,n=!1,o;if(!r)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===r)return!0;if(o=e[++i],o==="b"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!hn(e.charCodeAt(i)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!dn(e.charCodeAt(i)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;i<r;i++)if(o=e[i],o!=="_"){if(!mn(e.charCodeAt(i)))return!1;n=!0}return!(!n||o==="_")}function xn(e){var r=e,i=1,n;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),n=r[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),r=r.slice(1),n=r[0]),r==="0")return 0;if(n==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function An(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!C.isNegativeZero(e)}var Pr=new S("tag:yaml.org,2002:int",{kind:"scalar",resolve:gn,construct:xn,predicate:An,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function yn(e){return!(e===null||!vn.test(e)||e[e.length-1]==="_")}function bn(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}var Cn=/^[-+]?[0-9]+e/;function Sn(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),Cn.test(i)?i.replace("e",".e"):i}function En(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}var jr=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:yn,construct:bn,predicate:En,represent:Sn,defaultStyle:"lowercase"}),Yr=Mr.extend({implicit:[Dr,Br,Pr,jr]}),Hr=Yr,Ur=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Gr=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 wn(e){return e===null?!1:Ur.exec(e)!==null||Gr.exec(e)!==null}function On(e){var r,i,n,o,t,l,u,c=0,s=null,f,a,h;if(r=Ur.exec(e),r===null&&(r=Gr.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],n=+r[2]-1,o=+r[3],!r[4])return new Date(Date.UTC(i,n,o));if(t=+r[4],l=+r[5],u=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(f=+r[10],a=+(r[11]||0),s=(f*60+a)*6e4,r[9]==="-"&&(s=-s)),h=new Date(Date.UTC(i,n,o,t,l,u,c)),s&&h.setTime(h.getTime()-s),h}function Tn(e){return e.toISOString()}var $r=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wn,construct:On,instanceOf:Date,represent:Tn});function _n(e){return e==="<<"||e===null}var Kr=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_n}),Ue=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Fn(e){if(e===null)return!1;var r,i,n=0,o=e.length,t=Ue;for(i=0;i<o;i++)if(r=t.indexOf(e.charAt(i)),!(r>64)){if(r<0)return!1;n+=6}return n%8===0}function kn(e){var r,i,n=e.replace(/[\r\n=]/g,""),o=n.length,t=Ue,l=0,u=[];for(r=0;r<o;r++)r%4===0&&r&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|t.indexOf(n.charAt(r));return i=o%4*6,i===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):i===18?(u.push(l>>10&255),u.push(l>>2&255)):i===12&&u.push(l>>4&255),new Uint8Array(u)}function Nn(e){var r="",i=0,n,o,t=e.length,l=Ue;for(n=0;n<t;n++)n%3===0&&n&&(r+=l[i>>18&63],r+=l[i>>12&63],r+=l[i>>6&63],r+=l[i&63]),i=(i<<8)+e[n];return o=t%3,o===0?(r+=l[i>>18&63],r+=l[i>>12&63],r+=l[i>>6&63],r+=l[i&63]):o===2?(r+=l[i>>10&63],r+=l[i>>4&63],r+=l[i<<2&63],r+=l[64]):o===1&&(r+=l[i>>2&63],r+=l[i<<4&63],r+=l[64],r+=l[64]),r}function Ln(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Wr=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Fn,construct:kn,predicate:Ln,represent:Nn}),In=Object.prototype.hasOwnProperty,Rn=Object.prototype.toString;function Mn(e){if(e===null)return!0;var r=[],i,n,o,t,l,u=e;for(i=0,n=u.length;i<n;i+=1){if(o=u[i],l=!1,Rn.call(o)!=="[object Object]")return!1;for(t in o)if(In.call(o,t))if(!l)l=!0;else return!1;if(!l)return!1;if(r.indexOf(t)===-1)r.push(t);else return!1}return!0}function Dn(e){return e!==null?e:[]}var qr=new S("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Mn,construct:Dn}),Bn=Object.prototype.toString;function Pn(e){if(e===null)return!0;var r,i,n,o,t,l=e;for(t=new Array(l.length),r=0,i=l.length;r<i;r+=1){if(n=l[r],Bn.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;t[r]=[o[0],n[o[0]]]}return!0}function jn(e){if(e===null)return[];var r,i,n,o,t,l=e;for(t=new Array(l.length),r=0,i=l.length;r<i;r+=1)n=l[r],o=Object.keys(n),t[r]=[o[0],n[o[0]]];return t}var Vr=new S("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Pn,construct:jn}),Yn=Object.prototype.hasOwnProperty;function Hn(e){if(e===null)return!0;var r,i=e;for(r in i)if(Yn.call(i,r)&&i[r]!==null)return!1;return!0}function Un(e){return e!==null?e:{}}var Qr=new S("tag:yaml.org,2002:set",{kind:"mapping",resolve:Hn,construct:Un}),Ge=Hr.extend({implicit:[$r,Kr],explicit:[Wr,qr,Vr,Qr]}),M=Object.prototype.hasOwnProperty,ae=1,Xr=2,Zr=3,fe=4,De=1,Gn=2,mr=3,$n=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Kn=/[\x85\u2028\u2029]/,Wn=/[,\[\]\{\}]/,zr=/^(?:!|!!|![a-z\-]+!)$/i,Jr=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function gr(e){return Object.prototype.toString.call(e)}function N(e){return e===10||e===13}function j(e){return e===9||e===32}function O(e){return e===9||e===32||e===10||e===13}function K(e){return e===44||e===91||e===93||e===123||e===125}function qn(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}function Vn(e){return e===120?2:e===117?4:e===85?8:0}function Qn(e){return 48<=e&&e<=57?e-48:-1}function xr(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Xn(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ei=new Array(256),ri=new Array(256);for(P=0;P<256;P++)ei[P]=xr(P)?1:0,ri[P]=xr(P);var P;function Zn(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||Ge,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ii(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=en(i),new w(r,i)}function p(e,r){throw ii(e,r)}function pe(e,r){e.onWarning&&e.onWarning.call(null,ii(e,r))}var Ar={YAML:function(r,i,n){var o,t,l;r.version!==null&&p(r,"duplication of %YAML directive"),n.length!==1&&p(r,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&p(r,"ill-formed argument of the YAML directive"),t=parseInt(o[1],10),l=parseInt(o[2],10),t!==1&&p(r,"unacceptable YAML version of the document"),r.version=n[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&pe(r,"unsupported YAML version of the document")},TAG:function(r,i,n){var o,t;n.length!==2&&p(r,"TAG directive accepts exactly two arguments"),o=n[0],t=n[1],zr.test(o)||p(r,"ill-formed tag handle (first argument) of the TAG directive"),M.call(r.tagMap,o)&&p(r,'there is a previously declared suffix for "'+o+'" tag handle'),Jr.test(t)||p(r,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{p(r,"tag prefix is malformed: "+t)}r.tagMap[o]=t}};function R(e,r,i,n){var o,t,l,u;if(r<i){if(u=e.input.slice(r,i),n)for(o=0,t=u.length;o<t;o+=1)l=u.charCodeAt(o),l===9||32<=l&&l<=1114111||p(e,"expected valid JSON character");else $n.test(u)&&p(e,"the stream contains non-printable characters");e.result+=u}}function vr(e,r,i,n){var o,t,l,u;for(C.isObject(i)||p(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),l=0,u=o.length;l<u;l+=1)t=o[l],M.call(r,t)||(r[t]=i[t],n[t]=!0)}function W(e,r,i,n,o,t,l,u,c){var s,f;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),s=0,f=o.length;s<f;s+=1)Array.isArray(o[s])&&p(e,"nested arrays are not supported inside keys"),typeof o=="object"&&gr(o[s])==="[object Object]"&&(o[s]="[object Object]");if(typeof o=="object"&&gr(o)==="[object Object]"&&(o="[object Object]"),o=String(o),r===null&&(r={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(t))for(s=0,f=t.length;s<f;s+=1)vr(e,r,t[s],i);else vr(e,r,t,i);else!e.json&&!M.call(i,o)&&M.call(r,o)&&(e.line=l||e.line,e.lineStart=u||e.lineStart,e.position=c||e.position,p(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:t}):r[o]=t,delete i[o];return r}function $e(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):p(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function b(e,r,i){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;j(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(r&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(N(o))for($e(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&n!==0&&e.lineIndent<i&&pe(e,"deficient indentation"),n}function me(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||O(i)))}function Ke(e,r){r===1?e.result+=" ":r>1&&(e.result+=C.repeat(`
`,r-1))}function zn(e,r,i){var n,o,t,l,u,c,s,f,a=e.kind,h=e.result,d;if(d=e.input.charCodeAt(e.position),O(d)||K(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(o=e.input.charCodeAt(e.position+1),O(o)||i&&K(o)))return!1;for(e.kind="scalar",e.result="",t=l=e.position,u=!1;d!==0;){if(d===58){if(o=e.input.charCodeAt(e.position+1),O(o)||i&&K(o))break}else if(d===35){if(n=e.input.charCodeAt(e.position-1),O(n))break}else{if(e.position===e.lineStart&&me(e)||i&&K(d))break;if(N(d))if(c=e.line,s=e.lineStart,f=e.lineIndent,b(e,!1,-1),e.lineIndent>=r){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=c,e.lineStart=s,e.lineIndent=f;break}}u&&(R(e,t,l,!1),Ke(e,e.line-c),t=l=e.position,u=!1),j(d)||(l=e.position+1),d=e.input.charCodeAt(++e.position)}return R(e,t,l,!1),e.result?!0:(e.kind=a,e.result=h,!1)}function Jn(e,r){var i,n,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(R(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,o=e.position;else return!0;else N(i)?(R(e,n,o,!0),Ke(e,b(e,!1,r)),n=o=e.position):e.position===e.lineStart&&me(e)?p(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);p(e,"unexpected end of the stream within a single quoted scalar")}function eo(e,r){var i,n,o,t,l,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return R(e,i,e.position,!0),e.position++,!0;if(u===92){if(R(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),N(u))b(e,!1,r);else if(u<256&&ei[u])e.result+=ri[u],e.position++;else if((l=Vn(u))>0){for(o=l,t=0;o>0;o--)u=e.input.charCodeAt(++e.position),(l=qn(u))>=0?t=(t<<4)+l:p(e,"expected hexadecimal character");e.result+=Xn(t),e.position++}else p(e,"unknown escape sequence");i=n=e.position}else N(u)?(R(e,i,n,!0),Ke(e,b(e,!1,r)),i=n=e.position):e.position===e.lineStart&&me(e)?p(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}p(e,"unexpected end of the stream within a double quoted scalar")}function ro(e,r){var i=!0,n,o,t,l=e.tag,u,c=e.anchor,s,f,a,h,d,m=Object.create(null),x,y,F,g;if(g=e.input.charCodeAt(e.position),g===91)f=93,d=!1,u=[];else if(g===123)f=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),g=e.input.charCodeAt(++e.position);g!==0;){if(b(e,!0,r),g=e.input.charCodeAt(e.position),g===f)return e.position++,e.tag=l,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=u,!0;i?g===44&&p(e,"expected the node content, but found ','"):p(e,"missed comma between flow collection entries"),y=x=F=null,a=h=!1,g===63&&(s=e.input.charCodeAt(e.position+1),O(s)&&(a=h=!0,e.position++,b(e,!0,r))),n=e.line,o=e.lineStart,t=e.position,q(e,r,ae,!1,!0),y=e.tag,x=e.result,b(e,!0,r),g=e.input.charCodeAt(e.position),(h||e.line===n)&&g===58&&(a=!0,g=e.input.charCodeAt(++e.position),b(e,!0,r),q(e,r,ae,!1,!0),F=e.result),d?W(e,u,m,y,x,F,n,o,t):a?u.push(W(e,null,m,y,x,F,n,o,t)):u.push(x),b(e,!0,r),g=e.input.charCodeAt(e.position),g===44?(i=!0,g=e.input.charCodeAt(++e.position)):i=!1}p(e,"unexpected end of the stream within a flow collection")}function io(e,r){var i,n,o=De,t=!1,l=!1,u=r,c=0,s=!1,f,a;if(a=e.input.charCodeAt(e.position),a===124)n=!1;else if(a===62)n=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)De===o?o=a===43?mr:Gn:p(e,"repeat of a chomping mode identifier");else if((f=Qn(a))>=0)f===0?p(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?p(e,"repeat of an indentation width identifier"):(u=r+f-1,l=!0);else break;if(j(a)){do a=e.input.charCodeAt(++e.position);while(j(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!N(a)&&a!==0)}for(;a!==0;){for($e(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>u&&(u=e.lineIndent),N(a)){c++;continue}if(e.lineIndent<u){o===mr?e.result+=C.repeat(`
`,t?1+c:c):o===De&&t&&(e.result+=`
`,c=1;c<=r.linesAfter&&!(l+c>=o.length);c++)s=Be(e.buffer,n[l+c],o[l+c],e.position-(n[l]-n[l+c]),a),u+=C.repeat(" ",r.indent)+Pe((e.line+c+1).toString(),f)+" | "+s.str+`
`;return u.replace(/\n$/,"")}var on=nn,ln=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],tn=["scalar","sequence","mapping"];function un(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){r[String(n)]=i})}),r}function cn(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(ln.indexOf(i)===-1)throw new E('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=un(r.styleAliases||null),tn.indexOf(this.kind)===-1)throw new E('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var S=cn;function gr(e,r){var i=[];return e[r].forEach(function(n){var o=i.length;i.forEach(function(t,l){t.tag===n.tag&&t.kind===n.kind&&t.multi===n.multi&&(o=l)}),i[o]=n}),i}function sn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(n);return e}function Ye(e){return this.extend(e)}Ye.prototype.extend=function(r){var i=[],n=[];if(r instanceof S)n.push(r);else if(Array.isArray(r))n=n.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(n=n.concat(r.explicit));else throw new E("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(t){if(!(t instanceof S))throw new E("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&t.loadKind!=="scalar")throw new E("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new E("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof S))throw new E("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Ye.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=gr(o,"implicit"),o.compiledExplicit=gr(o,"explicit"),o.compiledTypeMap=sn(o.compiledImplicit,o.compiledExplicit),o};var Ir=Ye,Rr=new S("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Mr=new S("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Dr=new S("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Br=new Ir({explicit:[Rr,Mr,Dr]});function an(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function fn(){return null}function pn(e){return e===null}var Pr=new S("tag:yaml.org,2002:null",{kind:"scalar",resolve:an,construct:fn,predicate:pn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function hn(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function dn(e){return e==="true"||e==="True"||e==="TRUE"}function mn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var jr=new S("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hn,construct:dn,predicate:mn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function gn(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function xn(e){return 48<=e&&e<=55}function An(e){return 48<=e&&e<=57}function vn(e){if(e===null)return!1;var r=e.length,i=0,n=!1,o;if(!r)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===r)return!0;if(o=e[++i],o==="b"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!gn(e.charCodeAt(i)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!xn(e.charCodeAt(i)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;i<r;i++)if(o=e[i],o!=="_"){if(!An(e.charCodeAt(i)))return!1;n=!0}return!(!n||o==="_")}function yn(e){var r=e,i=1,n;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),n=r[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),r=r.slice(1),n=r[0]),r==="0")return 0;if(n==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function bn(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!C.isNegativeZero(e)}var Yr=new S("tag:yaml.org,2002:int",{kind:"scalar",resolve:vn,construct:yn,predicate:bn,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Cn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Sn(e){return!(e===null||!Cn.test(e)||e[e.length-1]==="_")}function wn(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}var En=/^[-+]?[0-9]+e/;function On(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),En.test(i)?i.replace("e",".e"):i}function Tn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}var Hr=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:Sn,construct:wn,predicate:Tn,represent:On,defaultStyle:"lowercase"}),Ur=Br.extend({implicit:[Pr,jr,Yr,Hr]}),Gr=Ur,$r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function _n(e){return e===null?!1:$r.exec(e)!==null||Kr.exec(e)!==null}function Fn(e){var r,i,n,o,t,l,u,c=0,s=null,f,a,h;if(r=$r.exec(e),r===null&&(r=Kr.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],n=+r[2]-1,o=+r[3],!r[4])return new Date(Date.UTC(i,n,o));if(t=+r[4],l=+r[5],u=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(f=+r[10],a=+(r[11]||0),s=(f*60+a)*6e4,r[9]==="-"&&(s=-s)),h=new Date(Date.UTC(i,n,o,t,l,u,c)),s&&h.setTime(h.getTime()-s),h}function kn(e){return e.toISOString()}var Wr=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_n,construct:Fn,instanceOf:Date,represent:kn});function Nn(e){return e==="<<"||e===null}var qr=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Nn}),Ke=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Ln(e){if(e===null)return!1;var r,i,n=0,o=e.length,t=Ke;for(i=0;i<o;i++)if(r=t.indexOf(e.charAt(i)),!(r>64)){if(r<0)return!1;n+=6}return n%8===0}function In(e){var r,i,n=e.replace(/[\r\n=]/g,""),o=n.length,t=Ke,l=0,u=[];for(r=0;r<o;r++)r%4===0&&r&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|t.indexOf(n.charAt(r));return i=o%4*6,i===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):i===18?(u.push(l>>10&255),u.push(l>>2&255)):i===12&&u.push(l>>4&255),new Uint8Array(u)}function Rn(e){var r="",i=0,n,o,t=e.length,l=Ke;for(n=0;n<t;n++)n%3===0&&n&&(r+=l[i>>18&63],r+=l[i>>12&63],r+=l[i>>6&63],r+=l[i&63]),i=(i<<8)+e[n];return o=t%3,o===0?(r+=l[i>>18&63],r+=l[i>>12&63],r+=l[i>>6&63],r+=l[i&63]):o===2?(r+=l[i>>10&63],r+=l[i>>4&63],r+=l[i<<2&63],r+=l[64]):o===1&&(r+=l[i>>2&63],r+=l[i<<4&63],r+=l[64],r+=l[64]),r}function Mn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Vr=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ln,construct:In,predicate:Mn,represent:Rn}),Dn=Object.prototype.hasOwnProperty,Bn=Object.prototype.toString;function Pn(e){if(e===null)return!0;var r=[],i,n,o,t,l,u=e;for(i=0,n=u.length;i<n;i+=1){if(o=u[i],l=!1,Bn.call(o)!=="[object Object]")return!1;for(t in o)if(Dn.call(o,t))if(!l)l=!0;else return!1;if(!l)return!1;if(r.indexOf(t)===-1)r.push(t);else return!1}return!0}function jn(e){return e!==null?e:[]}var Qr=new S("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Pn,construct:jn}),Yn=Object.prototype.toString;function Hn(e){if(e===null)return!0;var r,i,n,o,t,l=e;for(t=new Array(l.length),r=0,i=l.length;r<i;r+=1){if(n=l[r],Yn.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;t[r]=[o[0],n[o[0]]]}return!0}function Un(e){if(e===null)return[];var r,i,n,o,t,l=e;for(t=new Array(l.length),r=0,i=l.length;r<i;r+=1)n=l[r],o=Object.keys(n),t[r]=[o[0],n[o[0]]];return t}var Xr=new S("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hn,construct:Un}),Gn=Object.prototype.hasOwnProperty;function $n(e){if(e===null)return!0;var r,i=e;for(r in i)if(Gn.call(i,r)&&i[r]!==null)return!1;return!0}function Kn(e){return e!==null?e:{}}var Zr=new S("tag:yaml.org,2002:set",{kind:"mapping",resolve:$n,construct:Kn}),We=Gr.extend({implicit:[Wr,qr],explicit:[Vr,Qr,Xr,Zr]}),D=Object.prototype.hasOwnProperty,fe=1,zr=2,Jr=3,pe=4,je=1,Wn=2,xr=3,qn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vn=/[\x85\u2028\u2029]/,Qn=/[,\[\]\{\}]/,ei=/^(?:!|!!|![a-z\-]+!)$/i,ri=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ar(e){return Object.prototype.toString.call(e)}function N(e){return e===10||e===13}function j(e){return e===9||e===32}function O(e){return e===9||e===32||e===10||e===13}function W(e){return e===44||e===91||e===93||e===123||e===125}function Xn(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}function Zn(e){return e===120?2:e===117?4:e===85?8:0}function zn(e){return 48<=e&&e<=57?e-48:-1}function vr(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Jn(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ii=new Array(256),ni=new Array(256);for(P=0;P<256;P++)ii[P]=vr(P)?1:0,ni[P]=vr(P);var P;function eo(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||We,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function oi(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=on(i),new E(r,i)}function p(e,r){throw oi(e,r)}function he(e,r){e.onWarning&&e.onWarning.call(null,oi(e,r))}var yr={YAML:function(r,i,n){var o,t,l;r.version!==null&&p(r,"duplication of %YAML directive"),n.length!==1&&p(r,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&p(r,"ill-formed argument of the YAML directive"),t=parseInt(o[1],10),l=parseInt(o[2],10),t!==1&&p(r,"unacceptable YAML version of the document"),r.version=n[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&he(r,"unsupported YAML version of the document")},TAG:function(r,i,n){var o,t;n.length!==2&&p(r,"TAG directive accepts exactly two arguments"),o=n[0],t=n[1],ei.test(o)||p(r,"ill-formed tag handle (first argument) of the TAG directive"),D.call(r.tagMap,o)&&p(r,'there is a previously declared suffix for "'+o+'" tag handle'),ri.test(t)||p(r,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{p(r,"tag prefix is malformed: "+t)}r.tagMap[o]=t}};function M(e,r,i,n){var o,t,l,u;if(r<i){if(u=e.input.slice(r,i),n)for(o=0,t=u.length;o<t;o+=1)l=u.charCodeAt(o),l===9||32<=l&&l<=1114111||p(e,"expected valid JSON character");else qn.test(u)&&p(e,"the stream contains non-printable characters");e.result+=u}}function br(e,r,i,n){var o,t,l,u;for(C.isObject(i)||p(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),l=0,u=o.length;l<u;l+=1)t=o[l],D.call(r,t)||(r[t]=i[t],n[t]=!0)}function q(e,r,i,n,o,t,l,u,c){var s,f;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),s=0,f=o.length;s<f;s+=1)Array.isArray(o[s])&&p(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Ar(o[s])==="[object Object]"&&(o[s]="[object Object]");if(typeof o=="object"&&Ar(o)==="[object Object]"&&(o="[object Object]"),o=String(o),r===null&&(r={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(t))for(s=0,f=t.length;s<f;s+=1)br(e,r,t[s],i);else br(e,r,t,i);else!e.json&&!D.call(i,o)&&D.call(r,o)&&(e.line=l||e.line,e.lineStart=u||e.lineStart,e.position=c||e.position,p(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:t}):r[o]=t,delete i[o];return r}function qe(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):p(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function b(e,r,i){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;j(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(r&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(N(o))for(qe(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&n!==0&&e.lineIndent<i&&he(e,"deficient indentation"),n}function ge(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||O(i)))}function Ve(e,r){r===1?e.result+=" ":r>1&&(e.result+=C.repeat(`
`,r-1))}function ro(e,r,i){var n,o,t,l,u,c,s,f,a=e.kind,h=e.result,d;if(d=e.input.charCodeAt(e.position),O(d)||W(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(o=e.input.charCodeAt(e.position+1),O(o)||i&&W(o)))return!1;for(e.kind="scalar",e.result="",t=l=e.position,u=!1;d!==0;){if(d===58){if(o=e.input.charCodeAt(e.position+1),O(o)||i&&W(o))break}else if(d===35){if(n=e.input.charCodeAt(e.position-1),O(n))break}else{if(e.position===e.lineStart&&ge(e)||i&&W(d))break;if(N(d))if(c=e.line,s=e.lineStart,f=e.lineIndent,b(e,!1,-1),e.lineIndent>=r){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=c,e.lineStart=s,e.lineIndent=f;break}}u&&(M(e,t,l,!1),Ve(e,e.line-c),t=l=e.position,u=!1),j(d)||(l=e.position+1),d=e.input.charCodeAt(++e.position)}return M(e,t,l,!1),e.result?!0:(e.kind=a,e.result=h,!1)}function io(e,r){var i,n,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(M(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,o=e.position;else return!0;else N(i)?(M(e,n,o,!0),Ve(e,b(e,!1,r)),n=o=e.position):e.position===e.lineStart&&ge(e)?p(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);p(e,"unexpected end of the stream within a single quoted scalar")}function no(e,r){var i,n,o,t,l,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return M(e,i,e.position,!0),e.position++,!0;if(u===92){if(M(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),N(u))b(e,!1,r);else if(u<256&&ii[u])e.result+=ni[u],e.position++;else if((l=Zn(u))>0){for(o=l,t=0;o>0;o--)u=e.input.charCodeAt(++e.position),(l=Xn(u))>=0?t=(t<<4)+l:p(e,"expected hexadecimal character");e.result+=Jn(t),e.position++}else p(e,"unknown escape sequence");i=n=e.position}else N(u)?(M(e,i,n,!0),Ve(e,b(e,!1,r)),i=n=e.position):e.position===e.lineStart&&ge(e)?p(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}p(e,"unexpected end of the stream within a double quoted scalar")}function oo(e,r){var i=!0,n,o,t,l=e.tag,u,c=e.anchor,s,f,a,h,d,m=Object.create(null),x,y,F,g;if(g=e.input.charCodeAt(e.position),g===91)f=93,d=!1,u=[];else if(g===123)f=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),g=e.input.charCodeAt(++e.position);g!==0;){if(b(e,!0,r),g=e.input.charCodeAt(e.position),g===f)return e.position++,e.tag=l,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=u,!0;i?g===44&&p(e,"expected the node content, but found ','"):p(e,"missed comma between flow collection entries"),y=x=F=null,a=h=!1,g===63&&(s=e.input.charCodeAt(e.position+1),O(s)&&(a=h=!0,e.position++,b(e,!0,r))),n=e.line,o=e.lineStart,t=e.position,V(e,r,fe,!1,!0),y=e.tag,x=e.result,b(e,!0,r),g=e.input.charCodeAt(e.position),(h||e.line===n)&&g===58&&(a=!0,g=e.input.charCodeAt(++e.position),b(e,!0,r),V(e,r,fe,!1,!0),F=e.result),d?q(e,u,m,y,x,F,n,o,t):a?u.push(q(e,null,m,y,x,F,n,o,t)):u.push(x),b(e,!0,r),g=e.input.charCodeAt(e.position),g===44?(i=!0,g=e.input.charCodeAt(++e.position)):i=!1}p(e,"unexpected end of the stream within a flow collection")}function lo(e,r){var i,n,o=je,t=!1,l=!1,u=r,c=0,s=!1,f,a;if(a=e.input.charCodeAt(e.position),a===124)n=!1;else if(a===62)n=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)je===o?o=a===43?xr:Wn:p(e,"repeat of a chomping mode identifier");else if((f=zn(a))>=0)f===0?p(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?p(e,"repeat of an indentation width identifier"):(u=r+f-1,l=!0);else break;if(j(a)){do a=e.input.charCodeAt(++e.position);while(j(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!N(a)&&a!==0)}for(;a!==0;){for(qe(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>u&&(u=e.lineIndent),N(a)){c++;continue}if(e.lineIndent<u){o===xr?e.result+=C.repeat(`
`,t?1+c:c):o===je&&t&&(e.result+=`
`);break}for(n?j(a)?(s=!0,e.result+=C.repeat(`

@@ -22,20 +22,20 @@ `,t?1+c:c)):s?(s=!1,e.result+=C.repeat(`

`,c):e.result+=C.repeat(`
`,t?1+c:c),t=!0,l=!0,c=0,i=e.position;!N(a)&&a!==0;)a=e.input.charCodeAt(++e.position);R(e,i,e.position,!1)}return!0}function yr(e,r){var i,n=e.tag,o=e.anchor,t=[],l,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,p(e,"tab characters must not be used in indentation")),!(c!==45||(l=e.input.charCodeAt(e.position+1),!O(l))));){if(u=!0,e.position++,b(e,!0,-1)&&e.lineIndent<=r){t.push(null),c=e.input.charCodeAt(e.position);continue}if(i=e.line,q(e,r,Zr,!1,!0),t.push(e.result),b(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&c!==0)p(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return u?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=t,!0):!1}function no(e,r,i){var n,o,t,l,u,c,s=e.tag,f=e.anchor,a={},h=Object.create(null),d=null,m=null,x=null,y=!1,F=!1,g;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),g=e.input.charCodeAt(e.position);g!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,p(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),t=e.line,(g===63||g===58)&&O(n))g===63?(y&&(W(e,a,h,d,m,null,l,u,c),d=m=x=null),F=!0,y=!0,o=!0):y?(y=!1,o=!0):p(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=n;else{if(l=e.line,u=e.lineStart,c=e.position,!q(e,i,Xr,!1,!0))break;if(e.line===t){for(g=e.input.charCodeAt(e.position);j(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),O(g)||p(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(W(e,a,h,d,m,null,l,u,c),d=m=x=null),F=!0,y=!1,o=!1,d=e.tag,m=e.result;else if(F)p(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=f,!0}else if(F)p(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=f,!0}if((e.line===t||e.lineIndent>r)&&(y&&(l=e.line,u=e.lineStart,c=e.position),q(e,r,fe,!0,o)&&(y?m=e.result:x=e.result),y||(W(e,a,h,d,m,x,l,u,c),d=m=x=null),b(e,!0,-1),g=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>r)&&g!==0)p(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return y&&W(e,a,h,d,m,null,l,u,c),F&&(e.tag=s,e.anchor=f,e.kind="mapping",e.result=a),F}function oo(e){var r,i=!1,n=!1,o,t,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&p(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(i=!0,l=e.input.charCodeAt(++e.position)):l===33?(n=!0,o="!!",l=e.input.charCodeAt(++e.position)):o="!",r=e.position,i){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(t=e.input.slice(r,e.position),l=e.input.charCodeAt(++e.position)):p(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!O(l);)l===33&&(n?p(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(r-1,e.position+1),zr.test(o)||p(e,"named tag handle cannot contain such characters"),n=!0,r=e.position+1)),l=e.input.charCodeAt(++e.position);t=e.input.slice(r,e.position),Wn.test(t)&&p(e,"tag suffix cannot contain flow indicator characters")}t&&!Jr.test(t)&&p(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{p(e,"tag name is malformed: "+t)}return i?e.tag=t:M.call(e.tagMap,o)?e.tag=e.tagMap[o]+t:o==="!"?e.tag="!"+t:o==="!!"?e.tag="tag:yaml.org,2002:"+t:p(e,'undeclared tag handle "'+o+'"'),!0}function lo(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&p(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!O(i)&&!K(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&p(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function to(e){var r,i,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!O(n)&&!K(n);)n=e.input.charCodeAt(++e.position);return e.position===r&&p(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),M.call(e.anchorMap,i)||p(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],b(e,!0,-1),!0}function q(e,r,i,n,o){var t,l,u,c=1,s=!1,f=!1,a,h,d,m,x,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=l=u=fe===i||Zr===i,n&&b(e,!0,-1)&&(s=!0,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)),c===1)for(;oo(e)||lo(e);)b(e,!0,-1)?(s=!0,u=t,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)):u=!1;if(u&&(u=s||o),(c===1||fe===i)&&(ae===i||Xr===i?x=r:x=r+1,y=e.position-e.lineStart,c===1?u&&(yr(e,y)||no(e,y,x))||ro(e,x)?f=!0:(l&&io(e,x)||Jn(e,x)||eo(e,x)?f=!0:to(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&p(e,"alias node should not have any properties")):zn(e,x,ae===i)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=u&&yr(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&p(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),a=0,h=e.implicitTypes.length;a<h;a+=1)if(m=e.implicitTypes[a],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(M.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],a=0,h=d.length;a<h;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){m=d[a];break}m||p(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&p(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function uo(e){var r=e.position,i,n,o,t=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(b(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(t=!0,l=e.input.charCodeAt(++e.position),i=e.position;l!==0&&!O(l);)l=e.input.charCodeAt(++e.position);for(n=e.input.slice(i,e.position),o=[],n.length<1&&p(e,"directive name must not be less than one character in length");l!==0;){for(;j(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!N(l));break}if(N(l))break;for(i=e.position;l!==0&&!O(l);)l=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}l!==0&&$e(e),M.call(Ar,n)?Ar[n](e,n,o):pe(e,'unknown document directive "'+n+'"')}if(b(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,b(e,!0,-1)):t&&p(e,"directives end mark is expected"),q(e,e.lineIndent-1,fe,!1,!0),b(e,!0,-1),e.checkLineBreaks&&Kn.test(e.input.slice(r,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,b(e,!0,-1));return}if(e.position<e.length-1)p(e,"end of the stream or a document separator is expected");else return}function ni(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Zn(e,r),n=e.indexOf("\0");for(n!==-1&&(i.position=n,p(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)uo(i);return i.documents}function co(e,r,i){r!==null&&typeof r=="object"&&typeof i>"u"&&(i=r,r=null);var n=ni(e,i);if(typeof r!="function")return n;for(var o=0,t=n.length;o<t;o+=1)r(n[o])}function so(e,r){var i=ni(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new w("expected a single document in the stream, but found more")}}var ao=co,fo=so,oi={loadAll:ao,load:fo},li=Object.prototype.toString,ti=Object.prototype.hasOwnProperty,We=65279,po=9,ie=10,ho=13,mo=32,go=33,xo=34,Pe=35,Ao=37,vo=38,yo=39,bo=42,ui=44,Co=45,he=58,So=61,Eo=62,wo=63,Oo=64,ci=91,si=93,To=96,ai=123,_o=124,fi=125,E={};E[0]="\\0";E[7]="\\a";E[8]="\\b";E[9]="\\t";E[10]="\\n";E[11]="\\v";E[12]="\\f";E[13]="\\r";E[27]="\\e";E[34]='\\"';E[92]="\\\\";E[133]="\\N";E[160]="\\_";E[8232]="\\L";E[8233]="\\P";var Fo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ko=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function No(e,r){var i,n,o,t,l,u,c;if(r===null)return{};for(i={},n=Object.keys(r),o=0,t=n.length;o<t;o+=1)l=n[o],u=String(r[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),c=e.compiledTypeMap.fallback[l],c&&ti.call(c.styleAliases,u)&&(u=c.styleAliases[u]),i[l]=u;return i}function Lo(e){var r,i,n;if(r=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new w("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+C.repeat("0",n-r.length)+r}var Io=1,ne=2;function Ro(e){this.schema=e.schema||Ge,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=C.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=No(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ne:Io,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function br(e,r){for(var i=C.repeat(" ",r),n=0,o=-1,t="",l,u=e.length;n<u;)o=e.indexOf(`
`,t?1+c:c),t=!0,l=!0,c=0,i=e.position;!N(a)&&a!==0;)a=e.input.charCodeAt(++e.position);M(e,i,e.position,!1)}return!0}function Cr(e,r){var i,n=e.tag,o=e.anchor,t=[],l,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,p(e,"tab characters must not be used in indentation")),!(c!==45||(l=e.input.charCodeAt(e.position+1),!O(l))));){if(u=!0,e.position++,b(e,!0,-1)&&e.lineIndent<=r){t.push(null),c=e.input.charCodeAt(e.position);continue}if(i=e.line,V(e,r,Jr,!1,!0),t.push(e.result),b(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&c!==0)p(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return u?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=t,!0):!1}function to(e,r,i){var n,o,t,l,u,c,s=e.tag,f=e.anchor,a={},h=Object.create(null),d=null,m=null,x=null,y=!1,F=!1,g;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),g=e.input.charCodeAt(e.position);g!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,p(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),t=e.line,(g===63||g===58)&&O(n))g===63?(y&&(q(e,a,h,d,m,null,l,u,c),d=m=x=null),F=!0,y=!0,o=!0):y?(y=!1,o=!0):p(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=n;else{if(l=e.line,u=e.lineStart,c=e.position,!V(e,i,zr,!1,!0))break;if(e.line===t){for(g=e.input.charCodeAt(e.position);j(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),O(g)||p(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(q(e,a,h,d,m,null,l,u,c),d=m=x=null),F=!0,y=!1,o=!1,d=e.tag,m=e.result;else if(F)p(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=f,!0}else if(F)p(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=f,!0}if((e.line===t||e.lineIndent>r)&&(y&&(l=e.line,u=e.lineStart,c=e.position),V(e,r,pe,!0,o)&&(y?m=e.result:x=e.result),y||(q(e,a,h,d,m,x,l,u,c),d=m=x=null),b(e,!0,-1),g=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>r)&&g!==0)p(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return y&&q(e,a,h,d,m,null,l,u,c),F&&(e.tag=s,e.anchor=f,e.kind="mapping",e.result=a),F}function uo(e){var r,i=!1,n=!1,o,t,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&p(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(i=!0,l=e.input.charCodeAt(++e.position)):l===33?(n=!0,o="!!",l=e.input.charCodeAt(++e.position)):o="!",r=e.position,i){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(t=e.input.slice(r,e.position),l=e.input.charCodeAt(++e.position)):p(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!O(l);)l===33&&(n?p(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(r-1,e.position+1),ei.test(o)||p(e,"named tag handle cannot contain such characters"),n=!0,r=e.position+1)),l=e.input.charCodeAt(++e.position);t=e.input.slice(r,e.position),Qn.test(t)&&p(e,"tag suffix cannot contain flow indicator characters")}t&&!ri.test(t)&&p(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{p(e,"tag name is malformed: "+t)}return i?e.tag=t:D.call(e.tagMap,o)?e.tag=e.tagMap[o]+t:o==="!"?e.tag="!"+t:o==="!!"?e.tag="tag:yaml.org,2002:"+t:p(e,'undeclared tag handle "'+o+'"'),!0}function co(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&p(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!O(i)&&!W(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&p(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function so(e){var r,i,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!O(n)&&!W(n);)n=e.input.charCodeAt(++e.position);return e.position===r&&p(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),D.call(e.anchorMap,i)||p(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],b(e,!0,-1),!0}function V(e,r,i,n,o){var t,l,u,c=1,s=!1,f=!1,a,h,d,m,x,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=l=u=pe===i||Jr===i,n&&b(e,!0,-1)&&(s=!0,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)),c===1)for(;uo(e)||co(e);)b(e,!0,-1)?(s=!0,u=t,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)):u=!1;if(u&&(u=s||o),(c===1||pe===i)&&(fe===i||zr===i?x=r:x=r+1,y=e.position-e.lineStart,c===1?u&&(Cr(e,y)||to(e,y,x))||oo(e,x)?f=!0:(l&&lo(e,x)||io(e,x)||no(e,x)?f=!0:so(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&p(e,"alias node should not have any properties")):ro(e,x,fe===i)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=u&&Cr(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&p(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),a=0,h=e.implicitTypes.length;a<h;a+=1)if(m=e.implicitTypes[a],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(D.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],a=0,h=d.length;a<h;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){m=d[a];break}m||p(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&p(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function ao(e){var r=e.position,i,n,o,t=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(b(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(t=!0,l=e.input.charCodeAt(++e.position),i=e.position;l!==0&&!O(l);)l=e.input.charCodeAt(++e.position);for(n=e.input.slice(i,e.position),o=[],n.length<1&&p(e,"directive name must not be less than one character in length");l!==0;){for(;j(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!N(l));break}if(N(l))break;for(i=e.position;l!==0&&!O(l);)l=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}l!==0&&qe(e),D.call(yr,n)?yr[n](e,n,o):he(e,'unknown document directive "'+n+'"')}if(b(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,b(e,!0,-1)):t&&p(e,"directives end mark is expected"),V(e,e.lineIndent-1,pe,!1,!0),b(e,!0,-1),e.checkLineBreaks&&Vn.test(e.input.slice(r,e.position))&&he(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ge(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,b(e,!0,-1));return}if(e.position<e.length-1)p(e,"end of the stream or a document separator is expected");else return}function li(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new eo(e,r),n=e.indexOf("\0");for(n!==-1&&(i.position=n,p(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)ao(i);return i.documents}function fo(e,r,i){r!==null&&typeof r=="object"&&typeof i>"u"&&(i=r,r=null);var n=li(e,i);if(typeof r!="function")return n;for(var o=0,t=n.length;o<t;o+=1)r(n[o])}function po(e,r){var i=li(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new E("expected a single document in the stream, but found more")}}var ho=fo,mo=po,ti={loadAll:ho,load:mo},ui=Object.prototype.toString,ci=Object.prototype.hasOwnProperty,Qe=65279,go=9,ne=10,xo=13,Ao=32,vo=33,yo=34,He=35,bo=37,Co=38,So=39,wo=42,si=44,Eo=45,de=58,Oo=61,To=62,_o=63,Fo=64,ai=91,fi=93,ko=96,pi=123,No=124,hi=125,w={};w[0]="\\0";w[7]="\\a";w[8]="\\b";w[9]="\\t";w[10]="\\n";w[11]="\\v";w[12]="\\f";w[13]="\\r";w[27]="\\e";w[34]='\\"';w[92]="\\\\";w[133]="\\N";w[160]="\\_";w[8232]="\\L";w[8233]="\\P";var Lo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Io=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ro(e,r){var i,n,o,t,l,u,c;if(r===null)return{};for(i={},n=Object.keys(r),o=0,t=n.length;o<t;o+=1)l=n[o],u=String(r[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),c=e.compiledTypeMap.fallback[l],c&&ci.call(c.styleAliases,u)&&(u=c.styleAliases[u]),i[l]=u;return i}function Mo(e){var r,i,n;if(r=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new E("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+C.repeat("0",n-r.length)+r}var Do=1,oe=2;function Bo(e){this.schema=e.schema||We,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=C.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ro(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?oe:Do,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Sr(e,r){for(var i=C.repeat(" ",r),n=0,o=-1,t="",l,u=e.length;n<u;)o=e.indexOf(`
`,n),o===-1?(l=e.slice(n),n=u):(l=e.slice(n,o+1),n=o+1),l.length&&l!==`
`&&(t+=i),t+=l;return t}function je(e,r){return`
`+C.repeat(" ",e.indent*r)}function Mo(e,r){var i,n,o;for(i=0,n=e.implicitTypes.length;i<n;i+=1)if(o=e.implicitTypes[i],o.resolve(r))return!0;return!1}function de(e){return e===mo||e===po}function oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==We||65536<=e&&e<=1114111}function Cr(e){return oe(e)&&e!==We&&e!==ho&&e!==ie}function Sr(e,r,i){var n=Cr(e),o=n&&!de(e);return(i?n:n&&e!==ui&&e!==ci&&e!==si&&e!==ai&&e!==fi)&&e!==Pe&&!(r===he&&!o)||Cr(r)&&!de(r)&&e===Pe||r===he&&o}function Do(e){return oe(e)&&e!==We&&!de(e)&&e!==Co&&e!==wo&&e!==he&&e!==ui&&e!==ci&&e!==si&&e!==ai&&e!==fi&&e!==Pe&&e!==vo&&e!==bo&&e!==go&&e!==_o&&e!==So&&e!==Eo&&e!==yo&&e!==xo&&e!==Ao&&e!==Oo&&e!==To}function Bo(e){return!de(e)&&e!==he}function ee(e,r){var i=e.charCodeAt(r),n;return i>=55296&&i<=56319&&r+1<e.length&&(n=e.charCodeAt(r+1),n>=56320&&n<=57343)?(i-55296)*1024+n-56320+65536:i}function pi(e){var r=/^\n* /;return r.test(e)}var hi=1,Ye=2,di=3,mi=4,$=5;function Po(e,r,i,n,o,t,l,u){var c,s=0,f=null,a=!1,h=!1,d=n!==-1,m=-1,x=Do(ee(e,0))&&Bo(ee(e,e.length-1));if(r||l)for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=ee(e,c),!oe(s))return $;x=x&&Sr(s,f,u),f=s}else{for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=ee(e,c),s===ie)a=!0,d&&(h=h||c-m-1>n&&e[m+1]!==" ",m=c);else if(!oe(s))return $;x=x&&Sr(s,f,u),f=s}h=h||d&&c-m-1>n&&e[m+1]!==" "}return!a&&!h?x&&!l&&!o(e)?hi:t===ne?$:Ye:i>9&&pi(e)?$:l?t===ne?$:Ye:h?mi:di}function jo(e,r,i,n,o){e.dump=function(){if(r.length===0)return e.quotingType===ne?'""':"''";if(!e.noCompatMode&&(Fo.indexOf(r)!==-1||ko.test(r)))return e.quotingType===ne?'"'+r+'"':"'"+r+"'";var t=e.indent*Math.max(1,i),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=n||e.flowLevel>-1&&i>=e.flowLevel;function c(s){return Mo(e,s)}switch(Po(r,u,e.indent,l,c,e.quotingType,e.forceQuotes&&!n,o)){case hi:return r;case Ye:return"'"+r.replace(/'/g,"''")+"'";case di:return"|"+Er(r,e.indent)+wr(br(r,t));case mi:return">"+Er(r,e.indent)+wr(br(Yo(r,l),t));case $:return'"'+Ho(r)+'"';default:throw new w("impossible error: invalid scalar style")}}()}function Er(e,r){var i=pi(e)?String(r):"",n=e[e.length-1]===`
`&&(t+=i),t+=l;return t}function Ue(e,r){return`
`+C.repeat(" ",e.indent*r)}function Po(e,r){var i,n,o;for(i=0,n=e.implicitTypes.length;i<n;i+=1)if(o=e.implicitTypes[i],o.resolve(r))return!0;return!1}function me(e){return e===Ao||e===go}function le(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Qe||65536<=e&&e<=1114111}function wr(e){return le(e)&&e!==Qe&&e!==xo&&e!==ne}function Er(e,r,i){var n=wr(e),o=n&&!me(e);return(i?n:n&&e!==si&&e!==ai&&e!==fi&&e!==pi&&e!==hi)&&e!==He&&!(r===de&&!o)||wr(r)&&!me(r)&&e===He||r===de&&o}function jo(e){return le(e)&&e!==Qe&&!me(e)&&e!==Eo&&e!==_o&&e!==de&&e!==si&&e!==ai&&e!==fi&&e!==pi&&e!==hi&&e!==He&&e!==Co&&e!==wo&&e!==vo&&e!==No&&e!==Oo&&e!==To&&e!==So&&e!==yo&&e!==bo&&e!==Fo&&e!==ko}function Yo(e){return!me(e)&&e!==de}function re(e,r){var i=e.charCodeAt(r),n;return i>=55296&&i<=56319&&r+1<e.length&&(n=e.charCodeAt(r+1),n>=56320&&n<=57343)?(i-55296)*1024+n-56320+65536:i}function di(e){var r=/^\n* /;return r.test(e)}var mi=1,Ge=2,gi=3,xi=4,K=5;function Ho(e,r,i,n,o,t,l,u){var c,s=0,f=null,a=!1,h=!1,d=n!==-1,m=-1,x=jo(re(e,0))&&Yo(re(e,e.length-1));if(r||l)for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=re(e,c),!le(s))return K;x=x&&Er(s,f,u),f=s}else{for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=re(e,c),s===ne)a=!0,d&&(h=h||c-m-1>n&&e[m+1]!==" ",m=c);else if(!le(s))return K;x=x&&Er(s,f,u),f=s}h=h||d&&c-m-1>n&&e[m+1]!==" "}return!a&&!h?x&&!l&&!o(e)?mi:t===oe?K:Ge:i>9&&di(e)?K:l?t===oe?K:Ge:h?xi:gi}function Uo(e,r,i,n,o){e.dump=function(){if(r.length===0)return e.quotingType===oe?'""':"''";if(!e.noCompatMode&&(Lo.indexOf(r)!==-1||Io.test(r)))return e.quotingType===oe?'"'+r+'"':"'"+r+"'";var t=e.indent*Math.max(1,i),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=n||e.flowLevel>-1&&i>=e.flowLevel;function c(s){return Po(e,s)}switch(Ho(r,u,e.indent,l,c,e.quotingType,e.forceQuotes&&!n,o)){case mi:return r;case Ge:return"'"+r.replace(/'/g,"''")+"'";case gi:return"|"+Or(r,e.indent)+Tr(Sr(r,t));case xi:return">"+Or(r,e.indent)+Tr(Sr(Go(r,l),t));case K:return'"'+$o(r)+'"';default:throw new E("impossible error: invalid scalar style")}}()}function Or(e,r){var i=di(e)?String(r):"",n=e[e.length-1]===`
`,o=n&&(e[e.length-2]===`
`||e===`
`),t=o?"+":n?"":"-";return i+t+`
`}function wr(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Yo(e,r){for(var i=/(\n+)([^\n]*)/g,n=function(){var s=e.indexOf(`
`);return s=s!==-1?s:e.length,i.lastIndex=s,Or(e.slice(0,s),r)}(),o=e[0]===`
`}function Tr(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Go(e,r){for(var i=/(\n+)([^\n]*)/g,n=function(){var s=e.indexOf(`
`);return s=s!==-1?s:e.length,i.lastIndex=s,_r(e.slice(0,s),r)}(),o=e[0]===`
`||e[0]===" ",t,l;l=i.exec(e);){var u=l[1],c=l[2];t=c[0]===" ",n+=u+(!o&&!t&&c!==""?`
`:"")+Or(c,r),o=t}return n}function Or(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,n,o=0,t,l=0,u=0,c="";n=i.exec(e);)u=n.index,u-o>r&&(t=l>o?l:u,c+=`
`:"")+_r(c,r),o=t}return n}function _r(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,n,o=0,t,l=0,u=0,c="";n=i.exec(e);)u=n.index,u-o>r&&(t=l>o?l:u,c+=`
`+e.slice(o,t),o=t+1),l=u;return c+=`
`,e.length-o>r&&l>o?c+=e.slice(o,l)+`
`+e.slice(l+1):c+=e.slice(o),c.slice(1)}function Ho(e){for(var r="",i=0,n,o=0;o<e.length;i>=65536?o+=2:o++)i=ee(e,o),n=E[i],!n&&oe(i)?(r+=e[o],i>=65536&&(r+=e[o+1])):r+=n||Lo(i);return r}function Uo(e,r,i){var n="",o=e.tag,t,l,u;for(t=0,l=i.length;t<l;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(I(e,r,u,!1,!1)||typeof u>"u"&&I(e,r,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Tr(e,r,i,n){var o="",t=e.tag,l,u,c;for(l=0,u=i.length;l<u;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(I(e,r+1,c,!0,!0,!1,!0)||typeof c>"u"&&I(e,r+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=je(e,r)),e.dump&&ie===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=t,e.dump=o||"[]"}function Go(e,r,i){var n="",o=e.tag,t=Object.keys(i),l,u,c,s,f;for(l=0,u=t.length;l<u;l+=1)f="",n!==""&&(f+=", "),e.condenseFlow&&(f+='"'),c=t[l],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),I(e,r,c,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),I(e,r,s,!1,!1)&&(f+=e.dump,n+=f));e.tag=o,e.dump="{"+n+"}"}function $o(e,r,i,n){var o="",t=e.tag,l=Object.keys(i),u,c,s,f,a,h;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new w("sortKeys must be a boolean or a function");for(u=0,c=l.length;u<c;u+=1)h="",(!n||o!=="")&&(h+=je(e,r)),s=l[u],f=i[s],e.replacer&&(f=e.replacer.call(i,s,f)),I(e,r+1,s,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&ie===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,a&&(h+=je(e,r)),I(e,r+1,f,!0,a)&&(e.dump&&ie===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,o+=h));e.tag=t,e.dump=o||"{}"}function _r(e,r,i){var n,o,t,l,u,c;for(o=i?e.explicitTypes:e.implicitTypes,t=0,l=o.length;t<l;t+=1)if(u=o[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof r=="object"&&r instanceof u.instanceOf)&&(!u.predicate||u.predicate(r))){if(i?u.multi&&u.representName?e.tag=u.representName(r):e.tag=u.tag:e.tag="?",u.represent){if(c=e.styleMap[u.tag]||u.defaultStyle,li.call(u.represent)==="[object Function]")n=u.represent(r,c);else if(ti.call(u.represent,c))n=u.represent[c](r,c);else throw new w("!<"+u.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function I(e,r,i,n,o,t,l){e.tag=null,e.dump=i,_r(e,i,!1)||_r(e,i,!0);var u=li.call(e.dump),c=n,s;n&&(n=e.flowLevel<0||e.flowLevel>r);var f=u==="[object Object]"||u==="[object Array]",a,h;if(f&&(a=e.duplicates.indexOf(i),h=a!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&r>0)&&(o=!1),h&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(f&&h&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")n&&Object.keys(e.dump).length!==0?($o(e,r,e.dump,o),h&&(e.dump="&ref_"+a+e.dump)):(Go(e,r,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!l&&r>0?Tr(e,r-1,e.dump,o):Tr(e,r,e.dump,o),h&&(e.dump="&ref_"+a+e.dump)):(Uo(e,r,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&jo(e,e.dump,r,t,c);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new w("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function Ko(e,r){var i=[],n=[],o,t;for(He(e,i,n),o=0,t=n.length;o<t;o+=1)r.duplicates.push(i[n[o]]);r.usedDuplicates=new Array(t)}function He(e,r,i){var n,o,t;if(e!==null&&typeof e=="object")if(o=r.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(r.push(e),Array.isArray(e))for(o=0,t=e.length;o<t;o+=1)He(e[o],r,i);else for(n=Object.keys(e),o=0,t=n.length;o<t;o+=1)He(e[n[o]],r,i)}function Wo(e,r){r=r||{};var i=new Ro(r);i.noRefs||Ko(e,i);var n=e;return i.replacer&&(n=i.replacer.call({"":n},"",n)),I(i,0,n,!0,!0)?i.dump+`
`:""}var qo=Wo,Vo={dump:qo};function qe(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var Qo=S,Xo=Nr,Zo=Mr,zo=Yr,Jo=Hr,el=Ge,rl=oi.load,il=oi.loadAll,nl=Vo.dump,ol=w,ll={binary:Wr,float:jr,map:Rr,null:Dr,pairs:Vr,set:Qr,timestamp:$r,bool:Br,int:Pr,merge:Kr,omap:qr,seq:Ir,str:Lr},tl=qe("safeLoad","load"),ul=qe("safeLoadAll","loadAll"),cl=qe("safeDump","dump"),sl={Type:Qo,Schema:Xo,FAILSAFE_SCHEMA:Zo,JSON_SCHEMA:zo,CORE_SCHEMA:Jo,DEFAULT_SCHEMA:el,load:rl,loadAll:il,dump:nl,YAMLException:ol,types:ll,safeLoad:tl,safeLoadAll:ul,safeDump:cl},gi=sl;import*as T from"fs";import*as Ve from"path";var Qe=e=>!!T.existsSync(e),ge=e=>{let r,i;return r=new URL("../../",import.meta.url),i=r.pathname+e,i},xi=e=>T.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isDirectory()).map(r=>r.name),Ai=e=>{if(!T.existsSync(e))return T.mkdirSync(e,{recursive:!0})},Xe=(e,r)=>{let i,n,o;i=T.existsSync(e),n=i&&T.statSync(e),o=i&&n.isDirectory(),o?(T.mkdirSync(r),T.readdirSync(e).forEach(t=>{Xe(Ve.join(e,t),Ve.join(r,t))})):T.copyFileSync(e,r)};var Ze=e=>{let r;if(r=vi.readFileSync(e,{encoding:"utf-8"}),e.endsWith(".yml")||e.endsWith(".yaml")?r=gi.load(r):r=JSON.parse(r),!hr(r))throw B.throwError('File "'+e+'" must return a object');return r},yi=()=>Ze(ge("package.json"));var bi=()=>{let e=yi();return{cli:Object.keys(e.bin)[0],aliasCli:Object.keys(e.bin)[1],currCli:process.argv[1],version:e.version,args:process.argv.slice(2)}};import{existsSync as fl}from"fs";var Ci=e=>!!fl(e),ze=(e,r="",i=[])=>{let n,o,t;return n=!1,t=r?"/"+r:"",o=e+t,i.length===0?Ci(o)&&(n=o):i.forEach(l=>{o=e+t+"."+l,Ci(o)&&(n=o)}),n};import*as Si from"os";var V=class{infoFiledefaultVersion="1.0.0";infoFileExts=["yml","yaml","json"];mainFileTypes=[{cli:"source",exts:["sh","zsh"]},{cli:"node",exts:["js"]},{cli:"python",exts:["py"]}];mainFileExts=this.#e();#e(){return this.mainFileTypes.flatMap(r=>r.exts)}constructor(r){this.args=r,this.scriptsPath=Si.homedir()+"/.scriptsrc",this.defaultsPath=ge("data"),this.defaultScriptsPath=this.scriptsPath+"/default",this.utils={not:B,text:J}}};var xe=class extends V{#e(){return Qe(this.scriptsPath)}#r(){return Qe(this.defaultScriptsPath)}#i(){return Xe(this.defaultsPath,this.defaultScriptsPath),this.utils.not.info("Add default scripts in: "+this.defaultScriptsPath),!0}#n(){Ai(this.scriptsPath),this.utils.not.info("Created scripts folder in: "+this.scriptsPath)}addDefaults(){if(this.#e()||this.#n(),!this.#r())return this.#i()}scriptsFolder(){this.addDefaults()}};var Ae=class extends xe{getScriptData(r,i,n="default"){let o;return o=!1,this.mainFileTypes.forEach(t=>{let l=this.#i(r,t.exts);l&&(o={cli:t.cli,path:r,mainPath:l,name:i,type:n,info:this.#e(r)})}),o}#e(r){let i,n,o;return n={version:this.infoFiledefaultVersion,path:r},i={},i.exists=!1,i.data=n,o=this.#r(r),o&&(i={exists:!0,path:o,data:{...n,...Ze(o)}}),i}#r(r){return ze(r,"info",this.infoFileExts)}#i(r,i){return ze(r,"main",i)}};var ve=class extends Ae{getScriptListData(r=""){let i,n,o,t;return o=this.#e(this.defaultsPath),n=this.#e(this.defaultScriptsPath),i=this.#e(this.scriptsPath,"user"),t={...n,...i},r=="pkg"?o:r=="user"?n:r=="default"?i:t}#e(r,i="default"){let n,o,t,l,u;o=xi(r),l={};for(n of o)t=r+"/"+n,u=this.getScriptData(t,n,i),u&&(l[n]=u);return l}};var ye=class extends ve{scriptNames=this.getScriptListNames();defaultScriptNames=this.getScriptListNames("default");pkgScriptNames=this.getScriptListNames("pkg");getScriptListNames(r=""){let i;return i=this.#e(r),Object.keys(i)}getScriptDataByName(r,i=""){let n,o;return n=!1,o=this.#e(i),Object.keys(o).forEach(t=>{t===r&&(n=o[t])}),n}updateDefaults(){return!1}#e(r=""){return this.scriptsFolder(),this.getScriptListData(r)}};var be=class extends ye{};var D=class extends be{};var Ce=class extends D{constructor(r){super(r),this.cmds=["list"],this.aliases=["l"]}run(){let r;r=this.scriptNames.join(`
`),console.log(r)}};import*as Ei from"os";import{spawnSync as pl}from"child_process";var wi=e=>{let r=Ei.userInfo();pl(e,{stdio:"inherit",shell:!0,uid:r.uid,gid:r.gid})};var Q=class extends D{constructor(r){super(r),this.cmds=this.scriptNames,this.aliases=[]}#e(r){return this.utils.not.error(`Script [${r}] does not exist`)}execCmd(r,i){let n,o;if(o=this.getScriptDataByName(r),!o)return this.#e(r);n=`${o.cli} ${o.mainPath} ${i.join(" ")}`,this.utils.not.info("Execute: "+n),wi(n)}run(){let r,i;r=this.args.args[0],i=this.args.args.slice(1),this.execCmd(r,i)}};var Se=class extends Q{constructor(r){super(r),this.cmds=["exec"],this.aliases=[]}run(){let r,i;r=this.args.args[1],i=this.args.args.slice(2),this.execCmd(r,i)}};var Ee=class extends D{constructor(r){super(r),this.cmds=["info"],this.aliases=["i"]}#e(r){let i;return i=`Property [${r}] needs a parameter.`,i+=this.utils.text.blankLine,i+="Allowed parameters: "+this.scriptNames.join(", "),this.utils.not.error(i)}#r(r){return this.utils.not.error(`Script [${r}] does not exist.`)}run(){let r,i,n;if(r=this.args.args,i=r[1],!i)return this.#e(r[0]);if(!this.scriptNames.includes(i))return this.#r(i);n=this.getScriptDataByName(i).info.data,console.log(this.utils.text.info(`[${i}] Info:`)+this.utils.text.blankLine),console.log(n)}};var X=class extends V{constructor(r){super(r),this.cmds=["--version"],this.aliases=["-v"]}#e(){let r;return r=this.utils.text.standard("Version "),r+=this.utils.text.infoBg(` ${this.args.version} `),this.utils.not.standard(r)}run(){return this.#e()}};var we=class extends X{constructor(r){super(r),this.cmds=["--help"],this.aliases=["-h"]}#e(r,i){return this.utils.not.standard(this.utils.text.infoBg(" "+r+" ")+" "+i)}#r(r,i){return this.utils.not.group(this.utils.text.infoBg(" "+r+" "),this.utils.text.blankLine+i+this.utils.text.blankLine)}#i(r){let i,n;return i="Description",n="Cmd [ "+r+" ] ",n+="is used to execute, list or show the information of the scripts that are in folder ~/.scriptsrc.",n+=this.utils.text.blankLine+this.utils.text.blankLine,n+='if the folder ~/.scriptsrc does not exist will be automatically created with a "default" subfolder that stores the default scripts.',n+=this.utils.text.blankLine+this.utils.text.blankLine,n+="To create your own scripts you can do it by following the guide at:",n+=this.utils.text.blankLine,n+=this.utils.text.infoLink("https://github.com/pigeon-posse/pigeonsh"),this.#r(i,n)}#n(r,i){let n,o,t,l,u;return n="",Object.keys(r).forEach(c=>{o=c,u=Object.keys(r[c]).reduce((s,f)=>s.length>f.length?s:f),u=i+" "+u,u=u.length+1,n+=Object.keys(r)[0]!=c?this.utils.text.blankLine:"",n+=this.utils.text.infoBg(` ${o} `),n+=this.utils.text.blankLine,Object.keys(r[c]).forEach(s=>{t=i+" "+s,l=r[c][s],n+=t.padEnd(u," ")+this.utils.text.info(" - "+l),n+=this.utils.text.blankLine})}),n}#o(r){let i,n,o;return i="CLI usage",o={Commands:{"<script-name>":"Run the script named <script-name>.","exec <script-name>":"Run the script named <script-name>.","[ info | i ] <script-name>":"Show the information of the script named <script-name>.","[ list | l ]":"Show a list of available script names."},Flags:{"[ -h | --help ]":"Show CLI information.","[ -v | --version ]":"Show CLI version."}},n=this.#n(o,r),this.#r(i,n)}#t(r){let i,n;return i="Command list",n=r,this.#r(i,n)}#l(r){return this.#e("Version",r)}run(){let r,i,n;return i=this.args.cli,n=this.args.version,r=this.#i(i),r+=this.#o(i),r+=this.#l(n),r}};var Oe=class{constructor(r){this.args=r,this.opts=[Ce,Q,Ee,Se],this.flags=[we,X]}#e(r,i){let n;return n={exists:!1},r.forEach(o=>{let t=new o(this.args);(t.cmds.includes(i)||t.aliases.includes(i))&&(n.exists=!0,n.funct=t.run())}),n}getOpts(r){return this.#e(this.opts,r)}getFlags(r){return this.#e(this.flags,r)}};var Je=bi(),hl=()=>{let e,r,i,n,o;e=new Oe(Je),r=Je.args;for(i of r)return n=e.getFlags(i),o=e.getOpts(i),n.exists?n.funct:o.exists?o.funct:B.error(`[${i}] does not exist`)},Oi=()=>{let e;if(e=Je.args[0],!e)return B.error("command need a argument.");hl()};(async()=>Oi())();
`+e.slice(l+1):c+=e.slice(o),c.slice(1)}function $o(e){for(var r="",i=0,n,o=0;o<e.length;i>=65536?o+=2:o++)i=re(e,o),n=w[i],!n&&le(i)?(r+=e[o],i>=65536&&(r+=e[o+1])):r+=n||Mo(i);return r}function Ko(e,r,i){var n="",o=e.tag,t,l,u;for(t=0,l=i.length;t<l;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(I(e,r,u,!1,!1)||typeof u>"u"&&I(e,r,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Fr(e,r,i,n){var o="",t=e.tag,l,u,c;for(l=0,u=i.length;l<u;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(I(e,r+1,c,!0,!0,!1,!0)||typeof c>"u"&&I(e,r+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=Ue(e,r)),e.dump&&ne===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=t,e.dump=o||"[]"}function Wo(e,r,i){var n="",o=e.tag,t=Object.keys(i),l,u,c,s,f;for(l=0,u=t.length;l<u;l+=1)f="",n!==""&&(f+=", "),e.condenseFlow&&(f+='"'),c=t[l],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),I(e,r,c,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),I(e,r,s,!1,!1)&&(f+=e.dump,n+=f));e.tag=o,e.dump="{"+n+"}"}function qo(e,r,i,n){var o="",t=e.tag,l=Object.keys(i),u,c,s,f,a,h;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new E("sortKeys must be a boolean or a function");for(u=0,c=l.length;u<c;u+=1)h="",(!n||o!=="")&&(h+=Ue(e,r)),s=l[u],f=i[s],e.replacer&&(f=e.replacer.call(i,s,f)),I(e,r+1,s,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&ne===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,a&&(h+=Ue(e,r)),I(e,r+1,f,!0,a)&&(e.dump&&ne===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,o+=h));e.tag=t,e.dump=o||"{}"}function kr(e,r,i){var n,o,t,l,u,c;for(o=i?e.explicitTypes:e.implicitTypes,t=0,l=o.length;t<l;t+=1)if(u=o[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof r=="object"&&r instanceof u.instanceOf)&&(!u.predicate||u.predicate(r))){if(i?u.multi&&u.representName?e.tag=u.representName(r):e.tag=u.tag:e.tag="?",u.represent){if(c=e.styleMap[u.tag]||u.defaultStyle,ui.call(u.represent)==="[object Function]")n=u.represent(r,c);else if(ci.call(u.represent,c))n=u.represent[c](r,c);else throw new E("!<"+u.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function I(e,r,i,n,o,t,l){e.tag=null,e.dump=i,kr(e,i,!1)||kr(e,i,!0);var u=ui.call(e.dump),c=n,s;n&&(n=e.flowLevel<0||e.flowLevel>r);var f=u==="[object Object]"||u==="[object Array]",a,h;if(f&&(a=e.duplicates.indexOf(i),h=a!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&r>0)&&(o=!1),h&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(f&&h&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")n&&Object.keys(e.dump).length!==0?(qo(e,r,e.dump,o),h&&(e.dump="&ref_"+a+e.dump)):(Wo(e,r,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!l&&r>0?Fr(e,r-1,e.dump,o):Fr(e,r,e.dump,o),h&&(e.dump="&ref_"+a+e.dump)):(Ko(e,r,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&Uo(e,e.dump,r,t,c);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new E("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function Vo(e,r){var i=[],n=[],o,t;for($e(e,i,n),o=0,t=n.length;o<t;o+=1)r.duplicates.push(i[n[o]]);r.usedDuplicates=new Array(t)}function $e(e,r,i){var n,o,t;if(e!==null&&typeof e=="object")if(o=r.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(r.push(e),Array.isArray(e))for(o=0,t=e.length;o<t;o+=1)$e(e[o],r,i);else for(n=Object.keys(e),o=0,t=n.length;o<t;o+=1)$e(e[n[o]],r,i)}function Qo(e,r){r=r||{};var i=new Bo(r);i.noRefs||Vo(e,i);var n=e;return i.replacer&&(n=i.replacer.call({"":n},"",n)),I(i,0,n,!0,!0)?i.dump+`
`:""}var Xo=Qo,Zo={dump:Xo};function Xe(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var zo=S,Jo=Ir,el=Br,rl=Ur,il=Gr,nl=We,ol=ti.load,ll=ti.loadAll,tl=Zo.dump,ul=E,cl={binary:Vr,float:Hr,map:Dr,null:Pr,pairs:Xr,set:Zr,timestamp:Wr,bool:jr,int:Yr,merge:qr,omap:Qr,seq:Mr,str:Rr},sl=Xe("safeLoad","load"),al=Xe("safeLoadAll","loadAll"),fl=Xe("safeDump","dump"),pl={Type:zo,Schema:Jo,FAILSAFE_SCHEMA:el,JSON_SCHEMA:rl,CORE_SCHEMA:il,DEFAULT_SCHEMA:nl,load:ol,loadAll:ll,dump:tl,YAMLException:ul,types:cl,safeLoad:sl,safeLoadAll:al,safeDump:fl},Ai=pl;import*as T from"fs";import*as Ze from"path";var ze=e=>(e=R(e),!!T.existsSync(e)),xe=e=>{let r,i;return r=new URL("../../",import.meta.url),i=r.pathname+e,i},vi=e=>(e=R(e),T.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isDirectory()).map(r=>r.name)),yi=e=>{if(e=R(e),!T.existsSync(e))return T.mkdirSync(e,{recursive:!0})},Je=(e,r)=>{let i,n,o;e=R(e),r=R(r),i=T.existsSync(e),n=i&&T.statSync(e),o=i&&n.isDirectory(),o?(T.mkdirSync(r),T.readdirSync(e).forEach(t=>{Je(Ze.join(e,t),Ze.join(r,t))})):T.copyFileSync(e,r)};var er=e=>{let r;if(e=R(e),r=bi.readFileSync(e,{encoding:"utf-8"}),e.endsWith(".yml")||e.endsWith(".yaml")?r=Ai.load(r):r=JSON.parse(r),!mr(r))throw $.throwError('File "'+e+'" must return a object');return r},Ci=()=>er(xe("package.json"));var Si=()=>{let e=Ci();return{cli:Object.keys(e.bin)[0],aliasCli:Object.keys(e.bin)[1],currCli:process.argv[1],version:e.version,args:process.argv.slice(2)}};import{existsSync as dl}from"fs";var wi=e=>!!dl(e),rr=(e,r="",i=[])=>{let n,o,t;return n=!1,t=r?"/"+r:"",o=e+t,i.length===0?wi(o)&&(n=o):i.forEach(l=>{o=e+t+"."+l,wi(o)&&(n=o)}),n};import*as Ei from"os";var Q=class{infoFiledefaultVersion="1.0.0";infoFileExts=["yml","yaml","json"];mainFileTypes=this.#e();mainFileExts=this.#r();#e(){let r;return r=[{cli:"source",exts:["sh","zsh"]},{cli:"node",exts:["js"]},{cli:"python",exts:["py"]}],De()&&r.push({cli:"",exts:["bat"]}),r}#r(){return this.mainFileTypes.flatMap(r=>r.exts)}constructor(r){this.args=r,this.scriptsPath=Ei.homedir()+"/.scriptsrc",this.defaultsPath=xe("data"),this.defaultScriptsPath=this.scriptsPath+"/default",this.utils={not:$,text:ee}}};var Ae=class extends Q{#e(){return ze(this.scriptsPath)}#r(){return ze(this.defaultScriptsPath)}#i(){return Je(this.defaultsPath,this.defaultScriptsPath),this.utils.not.info("Add default scripts in: "+this.defaultScriptsPath),!0}#n(){yi(this.scriptsPath),this.utils.not.info("Created scripts folder in: "+this.scriptsPath)}addDefaults(){if(this.#e()||this.#n(),!this.#r())return this.#i()}scriptsFolder(){this.addDefaults()}};var ve=class extends Ae{getScriptData(r,i,n="default"){let o;return o=!1,this.mainFileTypes.forEach(t=>{let l=this.#i(r,t.exts);l&&(o={cli:t.cli,path:r,mainPath:l,name:i,type:n,info:this.#e(r)})}),o}#e(r){let i,n,o;return n={version:this.infoFiledefaultVersion,path:r},i={},i.exists=!1,i.data=n,o=this.#r(r),o&&(i={exists:!0,path:o,data:{...n,...er(o)}}),i}#r(r){return rr(r,"info",this.infoFileExts)}#i(r,i){return rr(r,"main",i)}};var ye=class extends ve{getScriptListData(r=""){let i,n,o,t;return o=this.#e(this.defaultsPath),n=this.#e(this.defaultScriptsPath),i=this.#e(this.scriptsPath,"user"),t={...n,...i},r=="pkg"?o:r=="user"?n:r=="default"?i:t}#e(r,i="default"){let n,o,t,l,u;o=vi(r),l={};for(n of o)t=r+"/"+n,u=this.getScriptData(t,n,i),u&&(l[n]=u);return l}};var be=class extends ye{scriptNames=this.getScriptListNames();defaultScriptNames=this.getScriptListNames("default");pkgScriptNames=this.getScriptListNames("pkg");getScriptListNames(r=""){let i;return i=this.#e(r),Object.keys(i)}getScriptDataByName(r,i=""){let n,o;return n=!1,o=this.#e(i),Object.keys(o).forEach(t=>{t===r&&(n=o[t])}),n}updateDefaults(){return!1}#e(r=""){return this.scriptsFolder(),this.getScriptListData(r)}};var Ce=class extends be{};var B=class extends Ce{};var Se=class extends B{constructor(r){super(r),this.cmds=["list"],this.aliases=["l"]}run(){let r;r=this.scriptNames.join(`
`),console.log(r)}};import*as Oi from"os";import{spawnSync as ml}from"child_process";var Ti=e=>{let r=Oi.userInfo();ml(e,{stdio:"inherit",shell:!0,uid:r.uid,gid:r.gid})};var X=class extends B{constructor(r){super(r),this.cmds=this.scriptNames,this.aliases=[]}#e(r){return this.utils.not.error(`Script [${r}] does not exist`)}execCmd(r,i){let n,o;if(o=this.getScriptDataByName(r),!o)return this.#e(r);n=`${o.cli} ${o.mainPath} ${i.join(" ")}`,this.utils.not.info("Execute: "+n),Ti(n)}run(){let r,i;r=this.args.args[0],i=this.args.args.slice(1),this.execCmd(r,i)}};var we=class extends X{constructor(r){super(r),this.cmds=["exec"],this.aliases=[]}run(){let r,i;r=this.args.args[1],i=this.args.args.slice(2),this.execCmd(r,i)}};var Ee=class extends B{constructor(r){super(r),this.cmds=["info"],this.aliases=["i"]}#e(r){let i;return i=`Property [${r}] needs a parameter.`,i+=this.utils.text.blankLine,i+="Allowed parameters: "+this.scriptNames.join(", "),this.utils.not.error(i)}#r(r){return this.utils.not.error(`Script [${r}] does not exist.`)}run(){let r,i,n;if(r=this.args.args,i=r[1],!i)return this.#e(r[0]);if(!this.scriptNames.includes(i))return this.#r(i);n=this.getScriptDataByName(i).info.data,console.log(this.utils.text.info(`[${i}] Info:`)+this.utils.text.blankLine),console.log(n)}};var Z=class extends Q{constructor(r){super(r),this.cmds=["--version"],this.aliases=["-v"]}#e(){let r;return r=this.utils.text.standard("Version "),r+=this.utils.text.infoBg(` ${this.args.version} `),this.utils.not.standard(r)}run(){return this.#e()}};var Oe=class extends Z{constructor(r){super(r),this.cmds=["--help"],this.aliases=["-h"]}#e(r,i){return this.utils.not.standard(this.utils.text.infoBg(" "+r+" ")+" "+i)}#r(r,i){return this.utils.not.group(this.utils.text.infoBg(" "+r+" "),this.utils.text.blankLine+i+this.utils.text.blankLine)}#i(r){let i,n;return i="Description",n="Cmd [ "+r+" ] ",n+="is used to execute, list or show the information of the scripts that are in folder ~/.scriptsrc.",n+=this.utils.text.blankLine+this.utils.text.blankLine,n+='if the folder ~/.scriptsrc does not exist will be automatically created with a "default" subfolder that stores the default scripts.',n+=this.utils.text.blankLine+this.utils.text.blankLine,n+="To create your own scripts you can do it by following the guide at:",n+=this.utils.text.blankLine,n+=this.utils.text.infoLink("https://github.com/pigeon-posse/pigeonsh"),this.#r(i,n)}#n(r,i){let n,o,t,l,u;return n="",Object.keys(r).forEach(c=>{o=c,u=Object.keys(r[c]).reduce((s,f)=>s.length>f.length?s:f),u=i+" "+u,u=u.length+1,n+=Object.keys(r)[0]!=c?this.utils.text.blankLine:"",n+=this.utils.text.infoBg(` ${o} `),n+=this.utils.text.blankLine,Object.keys(r[c]).forEach(s=>{t=i+" "+s,l=r[c][s],n+=t.padEnd(u," ")+this.utils.text.info(" - "+l),n+=this.utils.text.blankLine})}),n}#o(r){let i,n,o;return i="CLI usage",o={Commands:{"<script-name>":"Run the script named <script-name>.","exec <script-name>":"Run the script named <script-name>.","[ info | i ] <script-name>":"Show the information of the script named <script-name>.","[ list | l ]":"Show a list of available script names."},Flags:{"[ -h | --help ]":"Show CLI information.","[ -v | --version ]":"Show CLI version."}},n=this.#n(o,r),this.#r(i,n)}#t(r){let i,n;return i="Command list",n=r,this.#r(i,n)}#l(r){return this.#e("Version",r)}run(){let r,i,n;return i=this.args.cli,n=this.args.version,r=this.#i(i),r+=this.#o(i),r+=this.#l(n),r}};var Te=class{constructor(r){this.args=r,this.opts=[Se,X,Ee,we],this.flags=[Oe,Z]}#e(r,i){let n;return n={exists:!1},r.forEach(o=>{let t=new o(this.args);(t.cmds.includes(i)||t.aliases.includes(i))&&(n.exists=!0,n.funct=t.run())}),n}getOpts(r){return this.#e(this.opts,r)}getFlags(r){return this.#e(this.flags,r)}};var _e=Si(),gl=()=>{let e,r,i,n,o;e=new Te(_e),r=_e.args;for(i of r)return n=e.getFlags(i),o=e.getOpts(i),n.exists?n.funct:o.exists?o.funct:$.error(`[${i}] does not exist`)},_i=()=>{let e;e=_e.args[0],e||(_e.args="list"),gl()};(async()=>_i())();
/*! Bundled license information:

@@ -42,0 +42,0 @@

{
"name": "@pigeon-posse/pigeonsh",
"version": "0.8.4",
"version": "0.9.0",
"description": "Centralize your server scripts in a single folder and run them using a command",

@@ -5,0 +5,0 @@ "main": "dist/build/bundle.cjs",

{
"start" : "pnpm i",
"updates": "pnpm up",
"test": "node src/index.js",
"test-list": "node src/index.js list",
"updates-latest": "pnpm up --latest",

@@ -8,2 +10,6 @@ "build" : "pnpm pes lint-fix && pnpm pes build-bundle && pnpm pes build-pkg",

"build-pkg" : "pkg pkg.config.json",
"build-test" : "pnpm pes build-test-js && pnpm pes build-test-cjs",
"build-test-list" : "pnpm pes build-test-js list && pnpm pes build-test-cjs list",
"build-test-js" : "node dist/build/bundle.js",
"build-test-cjs" : "node dist/build/bundle.cjs",
"deploy": "pnpm pes lint-fix && npm login && npm publish --access public",

@@ -10,0 +16,0 @@ "lint": "eslint . --ext .js",

@@ -38,8 +38,11 @@ <!--

[![License](https://img.shields.io/github/license/pigeon-posse/pigeonsh?color=blue&label=License&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![Version](https://img.shields.io/npm/v/@pigeon-posse/pigeonsh?color=a1b858&label&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![Web](https://img.shields.io/badge/Web-grey?style=flat-square)](https://pigeonposse.com/)
[![About us](https://img.shields.io/badge/About-us-grey?style=flat-square)](https://pigeonposse.com/?popup=about)
[![About us](https://img.shields.io/badge/About%20us-grey?style=flat-square)](https://pigeonposse.com/?popup=about)
[![Github](https://img.shields.io/badge/Github-grey?style=flat-square)](https://github.com/pigeon-posse)
[![Donate](https://img.shields.io/badge/Donate-pink?style=flat-square)](https://pigeonposse.com/?popup=donate)
[![Size](https://img.shields.io/bundlephobia/min/@pigeon-posse/pigeonsh?label=Size&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![License](https://img.shields.io/github/license/pigeon-posse/pigeonsh?color=blue&label=License&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![Version](https://img.shields.io/npm/v/@pigeon-posse/pigeonsh?color=a1b858&label&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
# PIGEONSH by _PIGEONPOSSE™_

@@ -103,7 +106,7 @@

<!-- ##### ```Windows```:
##### ```Windows``` (no tested):
```bash
git clone https://github.com/pigeon-posse/pigeonsh.git pigeonsh && copy pigeonsh/dist/pigeonsh-win.exe /usr/local/bin/psh && psh hello
``` -->
```cmd
git clone https://github.com/pigeon-posse/pigeonsh.git pigeonsh && copy pigeonsh/dist/pigeonsh-win.exe C: \Program Files (x86)\Git \us\ local bin\psh && psh hello
```

@@ -261,3 +264,3 @@ ##### ✅ Success installation

This sofware is licensed with GPLv3 (GNU GENERAL PUBLIC LICENSE Version 3).
This software is licensed with GPLv3 (GNU GENERAL PUBLIC LICENSE Version 3).

@@ -277,5 +280,6 @@ [![Read more](https://img.shields.io/badge/Read-more-grey?style=flat-square)](https://github.com/pigeon-posse/pigeonsh/blob/main/LICENSE)

| <img src="https://github.com/AngelEspejo.png?size=72" style="border-radius:100%"/> | AngelEspejo | Author | [@AngelEspejo](https://github.com/AngelEspejo) |
| <img src="https://github.com/irfaelo.png?size=72" style="border-radius:100%"/> | Irfaelo | Windows compatibility | [@irfaelo](https://github.com/irfaelo) |
| <img src="https://github.com/PigeonPosse.png?size=72" style="border-radius:100%"/> | PigeonPosse | Collective | [@PigeonPosse](https://github.com/PigeonPosse) |
<br>
<br>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc