pubo-node 1.0.144 → 1.0.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pubo-node.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["pubo-node"]=t():e["pubo-node"]=t()}(this,(()=>(()=>{var e={649:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=649,e.exports=t},1:e=>{"use strict";e.exports=require("cluster")},808:e=>{"use strict";e.exports=require("net")},453:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(359);const o={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:r.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]}};function c(e,t){if("1.0"===(e.version||e.options.version)){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,"")}`}let n=e.tagPrefixes.find((e=>0===t.indexOf(e.prefix)));if(!n){const r=e.getDefaults().tagPrefixes;n=r&&r.find((e=>0===t.indexOf(e.prefix)))}if(!n)return"!"===t[0]?t:`!<${t}>`;const r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,(e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e])));return n.handle+r}function u(e,t,n,r){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);t||(t=i.newName(),i.map[t]=e.source)}}if(e instanceof s.Pair)return e.toString(t,n,r);a||(a=function(e,t){if(t instanceof s.Alias)return s.Alias;if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))||n[0]}let n,r;if(t instanceof s.Scalar){r=t.value;const s=e.filter((e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class));n=s.find((e=>e.format===t.format))||s.find((e=>!e.format))}else r=t,n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass));if(!n){const e=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}(o.tags,e));const u=function(e,t,{anchors:n,doc:r}){const s=[],i=r.anchors.getName(e);return i&&(n[i]=e,s.push(`&${i}`)),e.tag?s.push(c(r,e.tag)):t.default||s.push(c(r,t.tag)),s.join(" ")}(e,a,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(e,t,n,r):e instanceof s.Scalar?s.stringifyString(e,t,n,r):e.toString(t,n,r);return u?e instanceof s.Scalar||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${t.indent}${l}`:l}class l{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){r._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new s.Alias(e)}createMergePair(...e){const t=new s.Merge;return t.value.items=e.map((e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}getName(e){const{map:t}=this;return Object.keys(t).find((n=>t[n]===e))}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);const t=Object.keys(this.map);for(let n=1;;++n){const r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach((t=>{e[t]=e[t].resolved})),t.forEach((e=>{e.source=e.source.resolved})),delete this._cstAliases}setAnchor(e,t){if(null!=e&&!l.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(t&&/[\x00-\x19\s,[\]{}]/.test(t))throw new Error("Anchor names must not contain whitespace or control characters");const{map:n}=this,r=e&&Object.keys(n).find((t=>n[t]===e));if(r){if(!t)return r;r!==t&&(delete n[r],n[t]=e)}else{if(!t){if(!e)return null;t=this.newName()}n[t]=e}return t}}const f=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof s.Collection?(n&&(t[n]=!0),e.items.forEach((e=>f(e,t)))):e instanceof s.Pair?(f(e.key,t),f(e.value,t)):e instanceof s.Scalar&&n&&(t[n]=!0)}return t};function h({tagPrefixes:e},t){const[n,s]=t.parameters;if(!n||!s){const e="Insufficient parameters given for %TAG directive";throw new r.YAMLSemanticError(t,e)}if(e.some((e=>e.handle===n))){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new r.YAMLSemanticError(t,e)}return{handle:n,prefix:s}}function p(e,t){let[n]=t.parameters;if("YAML:1.0"===t.name&&(n="1.0"),!n){const e="Insufficient parameters given for %YAML directive";throw new r.YAMLSemanticError(t,e)}if(!a[n]){const s=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${n}`;e.warnings.push(new r.YAMLWarning(t,s))}return n}function d(e){if(e instanceof s.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class m{constructor(e){this.anchors=new l(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return d(this.contents),this.contents.add(e)}addIn(e,t){d(this.contents),this.contents.addIn(e,t)}delete(e){return d(this.contents),this.contents.delete(e)}deleteIn(e){return s.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(d(this.contents),this.contents.deleteIn(e))}getDefaults(){return m.defaults[this.version]||m.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):void 0}getIn(e,t){return s.isEmptyPath(e)?!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents:this.contents instanceof s.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof s.Collection&&this.contents.has(e)}hasIn(e){return s.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof s.Collection&&this.contents.hasIn(e)}set(e,t){d(this.contents),this.contents.set(e,t)}setIn(e,t){s.isEmptyPath(e)?this.contents=t:(d(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);const n=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:i=[],directivesEndMarker:o,error:a,valueRange:c}=e;if(a&&(a.source||(a.source=this),this.errors.push(a)),function(e,t,n){const s=[];let i=!1;for(const n of t){const{comment:t,name:o}=n;switch(o){case"TAG":try{e.tagPrefixes.push(h(e,n))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new r.YAMLSemanticError(n,t))}try{e.version=p(e,n)}catch(t){e.errors.push(t)}i=!0;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new r.YAMLWarning(n,t))}}t&&s.push(t)}if(n&&!i&&"1.1"===(e.version||n.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=n.tagPrefixes.map(t),e.version=n.version}e.commentBefore=s.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=c?[c.start,c.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let i,o=!1;for(const a of t)if(a.valueRange){if(void 0!==i){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new r.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);o&&(t.spaceBefore=!0,o=!1),i=t}else null!==a.comment?(void 0===i?n.before:n.after).push(a.comment):a.type===r.Type.BLANK_LINE&&(o=!0,void 0===i&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=i||null,i){const t=n.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof r.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof r.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=this.contents,Object.keys(f(e,{}))).filter((e=>0!==e.indexOf(i.Schema.defaultPrefix)));var e}setTagPrefix(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){const n=this.tagPrefixes.find((t=>t.handle===e));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((t=>t.handle!==e))}toJSON(e,t){const{keepBlobsInJSON:n,mapAsMap:r,maxAliasCount:i}=this.options,o=n&&("string"!=typeof e||!(this.contents instanceof s.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!r,maxAliasCount:i,stringify:u},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const l=s.toJSON(this.contents,e,a);if("function"==typeof t&&a.anchors)for(const{count:e,res:n}of a.anchors.values())t(n,e);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let n=!1;if(this.version){let e="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?e="%YAML:1.0":"1.1"===this.version&&(e="%YAML 1.1")),t.push(e),n=!0}const r=this.listNonDefaultTags();this.tagPrefixes.forEach((({handle:e,prefix:s})=>{r.some((e=>0===e.indexOf(s)))&&(t.push(`%TAG ${e} ${s}`),n=!0)})),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:u};let o=!1,a=null;if(this.contents){this.contents instanceof s.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);const e=a?null:()=>o=!0,r=u(this.contents,i,(()=>a=null),e);t.push(s.addComment(r,"",a))}else void 0!==this.contents&&t.push(u(this.contents,i));return this.comment&&(o&&!a||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}r._defineProperty(m,"defaults",a),t.Document=m,t.defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},t.scalarOptions=o},487:(e,t)=>{"use strict";const n={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},r={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function s(e){const t=[0];let n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function i(e){let t,n;return"string"==typeof e?(t=s(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=s(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function o(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=i(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){const r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}const s=n.length;return{line:s,col:e-n[s-1]+1}}class a{static copy(e){return new a(e.start,e.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let s=t;for(;s<e.length&&!(e[s]>n);)++s;this.origStart=n+s;const i=s;for(;s<e.length&&!(e[s]>=r);)++s;return this.origEnd=r+s,i}}class c{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=c.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,r){const s=e[t];if(!s)return!0;const i=e[t-1];if(i&&"\n"!==i)return!1;if(r){if(s!==r)return!1}else if(s!==n.DIRECTIVES_END&&s!==n.DOCUMENT_END)return!1;const o=e[t+1],a=e[t+2];if(o!==s||a!==s)return!1;const c=e[t+3];return!c||"\n"===c||"\t"===c||" "===c}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,s=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===s.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(e,t,n){const r=c.endOfIndent(e,n);if(r>n+t)return r;{const t=c.endOfWhiteSpace(e,r),n=e[t];if(!n||"\n"===n)return t}return null}static atBlank(e,t,n){const r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(e,t){const n=e[t];return n?"\n"!==n&&"\n"===e[t-1]?t-1:c.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,s=!1,i="",o=e[t+1];for(;" "===o||"\t"===o||"\n"===o;){switch(o){case"\n":r=0,t+=1,i+="\n";break;case"\t":r<=n&&(s=!0),t=c.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}o=e[t+1]}return i||(i=" "),o&&r<=n&&(s=!0),{fold:i,offset:t,error:s}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;const{src:r}=this.context,s=this.props[e];return s&&r[s.start]===t?r.slice(s.start+(n?1:0),s.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const r=this.getPropValue(t,n.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return e!==n||c.atBlank(t,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]===n.COMMENT)return!0}return!1}get hasProps(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]!==n.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[r.FLOW_MAP,r.FLOW_SEQ,r.QUOTE_DOUBLE,r.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=o(this.range.start,this.context.root);return e?{start:e,end:o(this.range.end,this.context.root)}:void 0}get rawValue(){if(!this.valueRange||!this.context)return null;const{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};{const[e,n,r]=t.match(/^(.*!)([^!]*)$/);return{handle:n,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;const{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(e){const{src:t}=this.context;if(t[e]===n.COMMENT){const n=c.endOfLine(t,e+1),r=new a(e,n);return this.props.push(r),n}return e}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){const{context:{src:e},range:t,value:n}=this;if(null!=n)return n;const r=e.slice(t.start,t.end);return c.addStringTerminator(e,t.end,r)}}class u extends Error{constructor(e,t,n){if(!(n&&t instanceof c))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&o(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;const r=e&&function({start:e,end:t},n,r=80){let s=function(e,t){const{lineStarts:n,src:r}=i(t);if(!n||!(e>=1)||e>n.length)return null;const s=n[e-1];let o=n[e];for(;o&&o>s&&"\n"===r[o-1];)--o;return r.slice(s,o)}(e.line,n);if(!s)return null;let{col:o}=e;if(s.length>r)if(o<=r-10)s=s.substr(0,r-1)+"…";else{const e=Math.round(r/2);s.length>o+e&&(s=s.substr(0,o+e-1)+"…"),o-=s.length-r,s="…"+s.substr(1-r)}let a=1,c="";return t&&(t.line===e.line&&o+(t.col-e.col)<=r+1?a=t.col-e.col:(a=Math.min(s.length+1,r)-o,c="…")),`${s}\n${o>1?" ".repeat(o-1):""}${"^".repeat(a)}${c}`}(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}}class l extends u{constructor(e,t){super("YAMLSemanticError",e,t)}}class f extends c{static endOfLine(e,t,n){let r=e[t],s=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[s+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;s+=1,r=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:n}=this.context;let r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let s="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=c.foldNewline(n,r,-1);s+=e,r=t}else if(" "===e||"\t"===e){const i=r;let o=n[r+1];for(;r<t&&(" "===o||"\t"===o);)r+=1,o=n[r+1];"\n"!==o&&(s+=r>i?n.slice(i,r+1):e)}else s+=e}const i=n[e];switch(i){case"\t":return{errors:[new l(this,"Plain value cannot start with a tab character")],str:s};case"@":case"`":return{errors:[new l(this,`Plain value cannot start with reserved character ${i}`)],str:s};default:return s}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let s=e,i=e;for(let e=r[s];"\n"===e&&!c.atDocumentBoundary(r,s+1);e=r[s]){const e=c.endOfBlockIndent(r,t,s+1);if(null===e||"#"===r[e])break;"\n"===r[e]?s=e:(i=f.endOfLine(r,e,n),s=i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=i,i}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let s=t;const i=r[s];return i&&"#"!==i&&"\n"!==i&&(s=f.endOfLine(r,t,n)),this.valueRange=new a(t,s),s=c.endOfWhiteSpace(r,s),s=this.parseComment(s),this.hasComment&&!this.valueRange.isEmpty()||(s=this.parseBlockValue(s)),s}}t.Char=n,t.Node=c,t.PlainValue=f,t.Range=a,t.Type=r,t.YAMLError=u,t.YAMLReferenceError=class extends u{constructor(e,t){super("YAMLReferenceError",e,t)}},t.YAMLSemanticError=l,t.YAMLSyntaxError=class extends u{constructor(e,t){super("YAMLSyntaxError",e,t)}},t.YAMLWarning=class extends u{constructor(e,t){super("YAMLWarning",e,t)}},t._defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.defaultTagPrefix="tag:yaml.org,2002:",t.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}},359:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(125);const o={createNode:function(e,t,n){const r=new s.YAMLMap(e);if(t instanceof Map)for(const[s,i]of t)r.items.push(e.createPair(s,i,n));else if(t&&"object"==typeof t)for(const s of Object.keys(t))r.items.push(e.createPair(s,t[s],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap},a={createNode:function(e,t,n){const r=new s.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const s of t){const t=e.createNode(s,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq},c={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,r)),options:s.strOptions},u=[o,a,c],l=e=>"bigint"==typeof e||Number.isInteger(e),f=(e,t,n)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,n);function h(e,t,n){const{value:r}=e;return l(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const p={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},d={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr},m={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>f(e,t,8),options:s.intOptions,stringify:e=>h(e,8,"0o")},g={identify:l,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>f(e,e,10),options:s.intOptions,stringify:s.stringifyNumber},y={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>f(e,t,16),options:s.intOptions,stringify:e=>h(e,16,"0x")},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},b={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},w={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const r=t||n,i=new s.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:s.stringifyNumber},S=u.concat([p,d,m,g,y,v,b,w]),O=e=>"bigint"==typeof e||Number.isInteger(e),E=({value:e})=>JSON.stringify(e),N=[o,a,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:E},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:E},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:E},{identify:O,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>O(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:E}];N.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};const A=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr,T=e=>"bigint"==typeof e||Number.isInteger(e);function L(e,t,n){let r=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`}const t=BigInt(r);return"-"===e?BigInt(-1)*t:t}const i=parseInt(r,n);return"-"===e?-1*i:i}function M(e,t,n){const{value:r}=e;if(T(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const x=u.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:s.boolOptions,stringify:A},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:s.boolOptions,stringify:A},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>L(t,n,2),stringify:e=>M(e,2,"0b")},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>L(t,n,8),stringify:e=>M(e,8,"0")},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>L(t,n,10),stringify:s.stringifyNumber},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>L(t,n,16),stringify:e=>M(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp),P={core:S,failsafe:u,json:N,yaml11:x},k={binary:i.binary,bool:d,float:w,floatExp:b,floatNaN:v,floatTime:i.floatTime,int:g,intHex:y,intOct:m,intTime:i.intTime,map:o,null:p,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};const I=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:s}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?I:r||null,!e&&s&&i.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let s=e[r.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(const e of n)s=s.concat(e);else"function"==typeof n&&(s=n(s.slice()));for(let e=0;e<s.length;++e){const n=s[e];if("string"==typeof n){const r=t[n];if(!r){const e=Object.keys(t).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${e}`)}s[e]=r}}return s}(P,k,e||s,n)}createNode(e,t,n,r){const i={defaultPrefix:_.defaultPrefix,schema:this,wrapScalars:t};return function(e,t,n){if(e instanceof s.Node)return e;const{defaultPrefix:r,onTagObj:i,prevObjects:c,schema:u,wrapScalars:l}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let f=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))||e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,u.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return l?new s.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?a:o}i&&(i(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&c){const t=c.get(e);if(t){const e=new s.Alias(t);return n.aliasNodes.push(e),e}h.value=e,c.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):l?new s.Scalar(e):e,t&&h.node instanceof s.Node&&(h.node.tag=t),h.node}(e,n,r?Object.assign(r,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new s.Pair(r,i)}}r._defineProperty(_,"defaultPrefix",r.defaultTagPrefix),r._defineProperty(_,"defaultTags",r.defaultTags),t.Schema=_},667:(e,t,n)=>{"use strict";var r=n(24),s=n(453),i=n(359),o=n(487),a=n(125);n(314);class c extends s.Document{constructor(e){super(Object.assign({},s.defaultOptions,e))}}function u(e,t){const n=r.parse(e),s=new c(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";s.errors.unshift(new o.YAMLSemanticError(n[1],e))}return s}const l={createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},s.Document.defaults[s.defaultOptions.version],s.defaultOptions);return new i.Schema(r).createNode(e,t,n)},defaultOptions:s.defaultOptions,Document:c,parse:function(e,t){const n=u(e,t);if(n.warnings.forEach((e=>a.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let s;for(const i of r.parse(e)){const e=new c(t);e.parse(i,s),n.push(e),s=e}return n},parseCST:r.parse,parseDocument:u,scalarOptions:s.scalarOptions,stringify:function(e,t){const n=new c(t);return n.contents=e,String(n)}};t.YAML=l},24:(e,t,n)=>{"use strict";var r=n(487);class s extends r.Node{constructor(){super(r.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new r.Range(t,t+1),t+1}}class i extends r.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{atLineStart:o,lineStart:a}=e;o||this.type!==r.Type.SEQ_ITEM||(this.error=new r.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const c=o?t-a:e.indent;let u=r.Node.endOfWhiteSpace(i,t+1),l=i[u];const f="#"===l,h=[];let p=null;for(;"\n"===l||"#"===l;){if("#"===l){const e=r.Node.endOfLine(i,u+1);h.push(new r.Range(u,e)),u=e}else o=!0,a=u+1,"\n"===i[r.Node.endOfWhiteSpace(i,a)]&&0===h.length&&(p=new s,a=p.parse({src:i},a)),u=r.Node.endOfIndent(i,a);l=i[u]}if(r.Node.nextNodeIsIndented(l,u-(a+c),this.type!==r.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:c,lineStart:a,parent:this},u):l&&a>t+1&&(u=a-1),this.node){if(p){const t=e.parent.items||e.parent.contents;t&&t.push(p)}h.length&&Array.prototype.push.apply(this.props,h),u=this.node.range.end}else if(f){const e=h[0];this.props.push(e),u=e.end}else u=r.Node.endOfLine(i,t+1);const d=this.node?this.node.valueRange.end:u;return this.valueRange=new r.Range(t,d),u}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:n,value:s}=this;if(null!=s)return s;const i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return r.Node.addStringTerminator(e,n.end,i)}}class o extends r.Node{constructor(){super(r.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new r.Range(t,n),n}}function a(e){let t=e;for(;t instanceof i;)t=t.node;if(!(t instanceof c))return null;const n=t.items.length;let s=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===r.Type.COMMENT){const{indent:t,lineStart:r}=n.context;if(t>0&&n.range.start>=r+t)break;s=e}else{if(n.type!==r.Type.BLANK_LINE)break;s=e}}if(-1===s)return null;const o=t.items.splice(s,n-s),a=o[0].range.start;for(;t.range.end=a,t.valueRange&&t.valueRange.end>a&&(t.valueRange.end=a),t!==e;)t=t.context.parent;return o}class c extends r.Node{static nextContentHasIndent(e,t,n){const s=r.Node.endOfLine(e,t)+1,i=e[t=r.Node.endOfWhiteSpace(e,s)];return!!i&&(t>=s+n||("#"===i||"\n"===i)&&c.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===r.Type.SEQ_ITEM?r.Type.SEQ:r.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);const n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];const t=a(e);t&&Array.prototype.push.apply(this.items,t)}get includesTrailingLines(){return this.items.length>0}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let u=r.Node.startOfLine(i,t);const l=this.items[0];l.context.parent=this,this.valueRange=r.Range.copy(l.valueRange);const f=l.range.start-l.context.lineStart;let h=t;h=r.Node.normalizeOffset(i,h);let p=i[h],d=r.Node.endOfWhiteSpace(i,u)===h,m=!1;for(;p;){for(;"\n"===p||"#"===p;){if(d&&"\n"===p&&!m){const e=new s;if(h=e.parse({src:i},h),this.valueRange.end=h,h>=i.length){p=null;break}this.items.push(e),h-=1}else if("#"===p){if(h<u+f&&!c.nextContentHasIndent(i,h,f))return h;const e=new o;if(h=e.parse({indent:f,lineStart:u,src:i},h),this.items.push(e),this.valueRange.end=h,h>=i.length){p=null;break}}if(u=h+1,h=r.Node.endOfIndent(i,u),r.Node.atBlank(i,h)){const e=r.Node.endOfWhiteSpace(i,h),t=i[e];t&&"\n"!==t&&"#"!==t||(h=e)}p=i[h],d=!0}if(!p)break;if(h!==u+f&&(d||":"!==p)){if(h<u+f){u>t&&(h=u);break}if(!this.error){const e="All collection items must start at the same column";this.error=new r.YAMLSyntaxError(this,e)}}if(l.type===r.Type.SEQ_ITEM){if("-"!==p){u>t&&(h=u);break}}else if("-"===p&&!this.error){const e=i[h+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new r.YAMLSyntaxError(this,e)}}const e=n({atLineStart:d,inCollection:!0,indent:f,lineStart:u,parent:this},h);if(!e)return h;if(this.items.push(e),this.valueRange.end=e.valueRange.end,h=r.Node.normalizeOffset(i,e.range.end),p=i[h],d=!1,m=e.includesTrailingLines,p){let e=h-1,t=i[e];for(;" "===t||"\t"===t;)t=i[--e];"\n"===t&&(u=e+1,d=!0)}const g=a(e);g&&Array.prototype.push.apply(this.items,g)}return h}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;let i=e.slice(n.start,t[0].range.start)+String(t[0]);for(let e=1;e<t.length;++e){const n=t[e],{atLineStart:r,indent:s}=n.context;if(r)for(let e=0;e<s;++e)i+=" ";i+=String(n)}return r.Node.addStringTerminator(e,n.end,i)}}class u extends r.Node{constructor(){super(r.Type.DIRECTIVE),this.name=null}get parameters(){const e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){const{src:t}=this.context;let n=e,s=t[n];for(;s&&"\n"!==s&&"#"!==s;)s=t[n+=1];return this.valueRange=new r.Range(e,n),n}parse(e,t){this.context=e;let n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new r.Range(t,n),n}}class l extends r.Node{static startCommentOrEndBlankLine(e,t){const n=r.Node.endOfWhiteSpace(e,t),s=e[n];return"#"===s||"\n"===s?n:t}constructor(){super(r.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){const{src:t}=this.context;this.directives=[];let n=!0,i=!1,a=e;for(;!r.Node.atDocumentBoundary(t,a,r.Char.DIRECTIVES_END);)switch(a=l.startCommentOrEndBlankLine(t,a),t[a]){case"\n":if(n){const e=new s;a=e.parse({src:t},a),a<t.length&&this.directives.push(e)}else a+=1,n=!0;break;case"#":{const e=new o;a=e.parse({src:t},a),this.directives.push(e),n=!1}break;case"%":{const e=new u;a=e.parse({parent:this,src:t},a),this.directives.push(e),i=!0,n=!1}break;default:return i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new r.Range(a,a+3),a+3):(i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let i=e;for(;"-"===n[i-1];)i-=1;let c=r.Node.endOfWhiteSpace(n,e),u=i===e;for(this.valueRange=new r.Range(c);!r.Node.atDocumentBoundary(n,c,r.Char.DOCUMENT_END);){switch(n[c]){case"\n":if(u){const e=new s;c=e.parse({src:n},c),c<n.length&&this.contents.push(e)}else c+=1,u=!0;i=c;break;case"#":{const e=new o;c=e.parse({src:n},c),this.contents.push(e),u=!1}break;default:{const e=r.Node.endOfIndent(n,c),s=t({atLineStart:u,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},e);if(!s)return this.valueRange.end=e;this.contents.push(s),c=s.range.end,u=!1;const o=a(s);o&&Array.prototype.push.apply(this.contents,o)}}c=l.startCommentOrEndBlankLine(n,c)}if(this.valueRange.end=c,n[c]&&(this.documentEndMarker=new r.Range(c,c+3),c+=3,n[c])){if(c=r.Node.endOfWhiteSpace(n,c),"#"===n[c]){const e=new o;c=e.parse({src:n},c),this.contents.push(e)}switch(n[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new r.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}parse(e,t){e.root=this,this.context=e;const{src:n}=e;let r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){const{contents:e,directives:t,value:n}=this;if(null!=n)return n;let s=t.join("");return e.length>0&&((t.length>0||e[0].type===r.Type.COMMENT)&&(s+="---\n"),s+=e.join("")),"\n"!==s[s.length-1]&&(s+="\n"),s}}class f extends r.Node{parse(e,t){this.context=e;const{src:n}=e;let s=r.Node.endOfIdentifier(n,t+1);return this.valueRange=new r.Range(t+1,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}const h="KEEP",p="STRIP";class d extends r.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping="CLIP",this.header=null}get includesTrailingLines(){return this.chomping===h}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[t-1];for(;"\n"===o||"\t"===o||" "===o;){if(t-=1,t<=e){if(this.chomping===h)break;return""}"\n"===o&&(i=t),o=s[t-1]}let a=t+1;i&&(this.chomping===h?(a=i,t=this.valueRange.end):t=i);const c=n+this.blockIndent,u=this.type===r.Type.BLOCK_FOLDED;let l=!0,f="",d="",m=!1;for(let n=e;n<t;++n){for(let e=0;e<c&&" "===s[n];++e)n+=1;const e=s[n];if("\n"===e)"\n"===d?f+="\n":d="\n";else{const i=r.Node.endOfLine(s,n),o=s.slice(n,i);n=i,u&&(" "===e||"\t"===e)&&n<a?(" "===d?d="\n":m||l||"\n"!==d||(d="\n\n"),f+=d+o,d=i<t&&s[i]||"",m=!0):(f+=d+o,d=u&&n<a?" ":"\n",m=!1),l&&""!==o&&(l=!1)}}return this.chomping===p?f:f+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,s="";for(;;){const i=t[n];switch(i){case"-":this.chomping=p;break;case"+":this.chomping=h;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new r.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,s=!!this.blockIndent;let i=e,o=e,a=1;for(let e=n[i];"\n"===e&&(i+=1,!r.Node.atDocumentBoundary(n,i));e=n[i]){const e=r.Node.endOfBlockIndent(n,t,i);if(null===e)break;const c=n[e],u=e-(i+t);if(this.blockIndent){if(c&&"\n"!==c&&u<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their "+(s?"explicit indentation indicator":"first line");this.error=new r.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(u<a){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new r.YAMLSemanticError(this,e)}this.blockIndent=u}else u>a&&(a=u);i="\n"===n[e]?e:o=r.Node.endOfLine(n,e)}return this.chomping!==h&&(i=n[o]?o+1:o),this.valueRange=new r.Range(e+1,i),i}parse(e,t){this.context=e;const{src:n}=e;let s=this.parseBlockHeader(t);return s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class m extends r.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===r.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{indent:a,lineStart:c}=e,u=i[t];this.items=[{char:u,offset:t}];let l=r.Node.endOfWhiteSpace(i,t+1);for(u=i[l];u&&"]"!==u&&"}"!==u;){switch(u){case"\n":if(c=l+1,"\n"===i[r.Node.endOfWhiteSpace(i,c)]){const e=new s;c=e.parse({src:i},c),this.items.push(e)}if(l=r.Node.endOfIndent(i,c),l<=c+a&&(u=i[l],l<c+a||"]"!==u&&"}"!==u)){const e="Insufficient indentation in flow collection";this.error=new r.YAMLSemanticError(this,e)}break;case",":this.items.push({char:u,offset:l}),l+=1;break;case"#":{const e=new o;l=e.parse({src:i},l),this.items.push(e)}break;case"?":case":":{const e=i[l+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===u&&this.prevNodeIsJsonLike()){this.items.push({char:u,offset:l}),l+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:c,parent:this},l);if(!e)return this.valueRange=new r.Range(t,l),l;this.items.push(e),l=r.Node.normalizeOffset(i,e.range.end)}}l=r.Node.endOfWhiteSpace(i,l),u=i[l]}return this.valueRange=new r.Range(t,l+1),u&&(this.items.push({char:u,offset:l}),l=r.Node.endOfWhiteSpace(i,l+1),l=this.parseComment(l)),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof r.Node)t=n.setOrigRanges(e,t);else if(0===e.length)n.origOffset=n.offset;else{let r=t;for(;r<e.length&&!(e[r]>n.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;const i=t.filter((e=>e instanceof r.Node));let o="",a=n.start;return i.forEach((t=>{const n=e.slice(a,t.range.start);a=t.range.end,o+=n+String(t),"\n"===o[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),r.Node.addStringTerminator(e,n.end,o)}}class g extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;'"'!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="";break;case"b":o+="\b";break;case"e":o+="";break;case"f":o+="\f";break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":case"\t":o+="\t";break;case"v":o+="\v";break;case"N":o+="…";break;case"_":o+=" ";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case"\n":for(;" "===i[a+1]||"\t"===i[a+1];)a+=1;break;default:e.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,n){const{src:s}=this.context,i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`)),s.substr(e-2,t+2)):String.fromCodePoint(o)}parse(e,t){this.context=e;const{src:n}=e;let s=g.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class y extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;"'"!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)o+=t,a+=1,"'"!==i[a]&&e.push(new r.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:n}=e;let s=y.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class v{static parseType(e,t,n){switch(e[t]){case"*":return r.Type.ALIAS;case">":return r.Type.BLOCK_FOLDED;case"|":return r.Type.BLOCK_LITERAL;case"{":return r.Type.FLOW_MAP;case"[":return r.Type.FLOW_SEQ;case"?":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_KEY:r.Type.PLAIN;case":":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_VALUE:r.Type.PLAIN;case"-":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.SEQ_ITEM:r.Type.PLAIN;case'"':return r.Type.QUOTE_DOUBLE;case"'":return r.Type.QUOTE_SINGLE;default:return r.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:s,indent:o,lineStart:a,parent:u}={}){r._defineProperty(this,"parseNode",((e,t)=>{if(r.Node.atDocumentBoundary(this.src,t))return null;const n=new v(this,e),{props:s,type:o,valueStart:a}=n.parseProps(t),u=function(e,t){switch(e){case r.Type.ALIAS:return new f(e,t);case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return new d(e,t);case r.Type.FLOW_MAP:case r.Type.FLOW_SEQ:return new m(e,t);case r.Type.MAP_KEY:case r.Type.MAP_VALUE:case r.Type.SEQ_ITEM:return new i(e,t);case r.Type.COMMENT:case r.Type.PLAIN:return new r.PlainValue(e,t);case r.Type.QUOTE_DOUBLE:return new g(e,t);case r.Type.QUOTE_SINGLE:return new y(e,t);default:return null}}(o,s);let l=u.parse(n,a);if(u.range=new r.Range(t,l),l<=t&&(u.error=new Error("Node#parse consumed no characters"),u.error.parseEnd=l,u.error.source=u,u.range.end=t+1),n.nodeStartsCollection(u)){u.error||n.atLineStart||n.parent.type!==r.Type.DOCUMENT||(u.error=new r.YAMLSyntaxError(u,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new c(u);return l=e.parse(new v(n),l),e.range=new r.Range(t,l),e}return u})),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=s?s:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=a?a:e.lineStart,this.parent=null!=u?u:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:s}=this;if(t||n)return!1;if(e instanceof i)return!0;let o=e.range.end;return"\n"!==s[o]&&"\n"!==s[o-1]&&(o=r.Node.endOfWhiteSpace(s,o),":"===s[o])}parseProps(e){const{inFlow:t,parent:n,src:s}=this,i=[];let o=!1,a=s[e=this.atLineStart?r.Node.endOfIndent(s,e):r.Node.endOfWhiteSpace(s,e)];for(;a===r.Char.ANCHOR||a===r.Char.COMMENT||a===r.Char.TAG||"\n"===a;){if("\n"===a){let t,i=e;do{t=i+1,i=r.Node.endOfIndent(s,t)}while("\n"===s[i]);const a=i-(t+this.indent),c=n.type===r.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==s[i]&&!r.Node.nextNodeIsIndented(s[i],a,!c))break;this.atLineStart=!0,this.lineStart=t,o=!1,e=i}else if(a===r.Char.COMMENT){const t=r.Node.endOfLine(s,e+1);i.push(new r.Range(e,t)),e=t}else{let t=r.Node.endOfIdentifier(s,e+1);a===r.Char.TAG&&","===s[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))&&(t=r.Node.endOfIdentifier(s,t+5)),i.push(new r.Range(e,t)),o=!0,e=r.Node.endOfWhiteSpace(s,t)}a=s[e]}return o&&":"===a&&r.Node.atBlank(s,e+1,!0)&&(e-=1),{props:i,type:v.parseType(s,e,t),valueStart:e}}}t.parse=function(e){const t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,((e,n)=>(e.length>1&&t.push(n),"\n"))));const n=[];let r=0;do{const t=new l,s=new v({src:e});r=t.parse(s,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(0===t.length)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join("...\n"),n}},314:(e,t,n)=>{"use strict";var r=n(487);function s(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}class i{}function o(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),n)));if(e&&"function"==typeof e.toJSON){const r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});const s=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(s),s}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class a extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}}function c(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(Number.isInteger(n)&&n>=0){const e=[];e[n]=r,r=e}else{const e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}const u=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class l extends i{constructor(e){super(),r._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(u(e))this.add(t);else{const[n,...r]=e,s=this.get(n,!0);if(s instanceof l)s.addIn(r,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,c(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof l)return n.deleteIn(t);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],n){const r=this.get(e,!0);return 0===t.length?!n&&r instanceof a?r.value:r:r instanceof l?r.getIn(t,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof a&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([e,...t]){if(0===t.length)return this.has(e);const n=this.get(e,!0);return n instanceof l&&n.hasIn(t)}setIn([e,...t],n){if(0===t.length)this.set(e,n);else{const r=this.get(e,!0);if(r instanceof l)r.setIn(t,n);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`);this.set(e,c(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:i,itemIndent:o},a,c){const{indent:u,indentStep:f,stringify:h}=e,p=this.type===r.Type.FLOW_MAP||this.type===r.Type.FLOW_SEQ||e.inFlow;p&&(o+=f);const d=i&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:o,inFlow:p,type:null});let m=!1,g=!1;const y=this.items.reduce(((t,n,r)=>{let i;n&&(!m&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:`#${e}`})})),n.comment&&(i=n.comment),p&&(!m&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(g=!0)),m=!1;let a=h(n,e,(()=>i=null),(()=>m=!0));return p&&!g&&a.includes("\n")&&(g=!0),p&&r<this.items.length-1&&(a+=","),a=s(a,o,i),m&&(i||p)&&(m=!1),t.push({type:"item",str:a}),t}),[]);let v;if(0===y.length)v=n.start+n.end;else if(p){const{start:e,end:t}=n,r=y.map((e=>e.str));if(g||r.reduce(((e,t)=>e+t.length+2),2)>l.maxFlowStringSingleLineLength){v=e;for(const e of r)v+=e?`\n${f}${u}${e}`:"\n";v+=`\n${u}${t}`}else v=`${e} ${r.join(" ")} ${t}`}else{const e=y.map(t);v=e.shift();for(const t of e)v+=t?`\n${u}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${u}#`),a&&a()):m&&c&&c(),v}}function f(e){let t=e instanceof a?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}r._defineProperty(l,"maxFlowStringSingleLineLength",60);class h extends l{add(e){this.items.push(e)}delete(e){const t=f(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=f(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof a?r.value:r}has(e){const t=f(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=f(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);this.items[n]=t}toJSON(e,t){const n=[];t&&t.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}class p extends i{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=p.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new a(null)),!(this.key instanceof i))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}addToJSMap(e,t){const n=o(this.key,"",e);if(t instanceof Map){const r=o(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{const r=((e,t,n)=>null===t?"":"object"!=typeof t?String(t):e instanceof i&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e),s=o(this.value,r,e);r in t?Object.defineProperty(t,r,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[r]=s}return t}toJSON(e,t){const n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,t,n){if(!e||!e.doc)return JSON.stringify(this);const{indent:o,indentSeq:c,simpleKeys:u}=e.doc.options;let{key:f,value:p}=this,d=f instanceof i&&f.comment;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(f instanceof l)throw new Error("With simple keys, collection cannot be used as a key value")}let m=!u&&(!f||d||(f instanceof i?f instanceof l||f.type===r.Type.BLOCK_FOLDED||f.type===r.Type.BLOCK_LITERAL:"object"==typeof f));const{doc:g,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!m,indent:y+v});let w=!1,S=b(f,e,(()=>d=null),(()=>w=!0));if(S=s(S,e.indent,d),!m&&S.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(e.allNullValues&&!u)return this.comment?(S=s(S,e.indent,this.comment),t&&t()):w&&!d&&n&&n(),e.inFlow&&!m?S:`? ${S}`;S=m?`? ${S}\n${y}:`:`${S}:`,this.comment&&(S=s(S,e.indent,this.comment),t&&t());let O="",E=null;p instanceof i?(p.spaceBefore&&(O="\n"),p.commentBefore&&(O+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`),E=p.comment):p&&"object"==typeof p&&(p=g.schema.createNode(p,!0)),e.implicitKey=!1,!m&&!this.comment&&p instanceof a&&(e.indentAtStart=S.length+1),w=!1,!c&&o>=2&&!e.inFlow&&!m&&p instanceof h&&p.type!==r.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));const N=b(p,e,(()=>E=null),(()=>w=!0));let A=" ";return O||this.comment?A=`${O}\n${e.indent}`:!m&&p instanceof l?("["===N[0]||"{"===N[0])&&!N.includes("\n")||(A=`\n${e.indent}`):"\n"===N[0]&&(A=""),w&&!E&&n&&n(),s(S+A+N,e.indent,E)}}r._defineProperty(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const d=(e,t)=>{if(e instanceof m){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof l){let n=0;for(const r of e.items){const e=d(r,t);e>n&&(n=e)}return n}if(e instanceof p){const n=d(e.key,t),r=d(e.value,t);return Math.max(n,r)}return 1};class m extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:s,inStringifyKey:i}){let o=Object.keys(n).find((e=>n[e]===t));if(!o&&i&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${s?" ":""}`;const a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=r.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return o(this.source,e,t);const{anchors:n,maxAliasCount:s}=t,i=n.get(this.source);if(!i||void 0===i.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(s>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=d(this.source,n)),i.count*i.aliasCount>s)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return i.res}toString(e){return m.stringify(this,e)}}function g(e,t){const n=t instanceof a?t.value:t;for(const r of e)if(r instanceof p){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}r._defineProperty(m,"default",!0);class y extends l{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);const n=g(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error(`Key ${e.key} already set`);n.value=e.value}else if(r){const t=this.items.findIndex((t=>r(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=g(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=g(this.items,e),r=n&&n.value;return!t&&r instanceof a?r.value:r}has(e){return!!g(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){const r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(const e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!(e instanceof p))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}class v extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof h||(t=new h,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new a("<<"),new h);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof y))throw new Error("Merge sources must be maps");const r=n.toJSON(null,e,Map);for(const[e,n]of r)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){const n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];const r=super.toString(e,t);return this.value=n,r}}const b={defaultType:r.Type.BLOCK_LITERAL,lineWidth:76},w={defaultType:r.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function S(e,t,n){for(const{format:n,test:r,resolve:s}of t)if(r){const t=e.match(r);if(t){let e=s.apply(null,t);return e instanceof a||(e=new a(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new a(e)}const O="flow",E="block",N="quoted",A=(e,t)=>{let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function T(e,t,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let f,h,p=s-t.length;"number"==typeof r&&(r>s-Math.max(2,i)?u.push(0):p=s-r);let d=!1,m=-1,g=-1,y=-1;n===E&&(m=A(e,m),-1!==m&&(p=m+c));for(let t;t=e[m+=1];){if(n===N&&"\\"===t){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===t)n===E&&(m=A(e,m)),p=m+c,f=void 0;else{if(" "===t&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=m)}if(m>=p)if(f)u.push(f),p=f+c,f=void 0;else if(n===N){for(;" "===h||"\t"===h;)h=t,t=e[m+=1],d=!0;const n=m>y+1?m-2:g-1;if(l[n])return e;u.push(n),l[n]=!0,p=n+c,f=void 0}else d=!0}h=t}if(d&&a&&a(),0===u.length)return e;o&&o();let v=e.slice(0,u[0]);for(let r=0;r<u.length;++r){const s=u[r],i=u[r+1]||e.length;0===s?v=`\n${t}${e.slice(0,i)}`:(n===N&&l[s]&&(v+=`${e[s]}\\`),v+=`\n${t}${e.slice(s+1,i)}`)}return v}const L=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},w.fold):w.fold,M=e=>/^(%|---|\.\.\.)/m.test(e);function x(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:s}=w.doubleQuoted,i=JSON.stringify(e);if(r)return i;const o=t.indent||(M(e)?" ":"");let a="",c=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(a+=i.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{a+=i.slice(c,e);const t=i.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=i.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<s)e+=1;else{for(a+=i.slice(c,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)a+="\n",e+=2;a+=o," "===i[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+i.slice(c):i,n?a:T(a,o,N,L(t))}function P(e,t){if(t.implicitKey){if(/\n/.test(e))return x(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return x(e,t);const n=t.indent||(M(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:T(r,n,O,L(t))}function k({comment:e,type:t,value:n},s,i,o){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return x(n,s);const a=s.indent||(s.forceBlockIndent||M(n)?" ":""),c=a?"2":"1",u=t!==r.Type.BLOCK_FOLDED&&(t===r.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,w.fold.lineWidth,a.length));let l=u?"|":">";if(!n)return l+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":n!==e&&t===e.length-1||(l+="+",o&&o()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=c);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(l+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${l}${c}\n${a}${h}`;if(u)return n=n.replace(/\n+/g,`$&${a}`),`${l}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=T(`${f}${n}${h}`,a,E,w.fold);return`${l}\n${a}${p}`}function I(e,t){let n,s,i;switch(t.type){case r.Type.FLOW_MAP:n="}",s="flow map";break;case r.Type.FLOW_SEQ:n="]",s="flow sequence";break;default:return void e.push(new r.YAMLSemanticError(t,"Not a flow collection!?"))}for(let e=t.items.length-1;e>=0;--e){const n=t.items[e];if(!n||n.type!==r.Type.COMMENT){i=n;break}}if(i&&i.char!==n){const o=`Expected ${s} to end with ${n}`;let a;"number"==typeof i.offset?(a=new r.YAMLSemanticError(t,o),a.offset=i.offset+1):(a=new r.YAMLSemanticError(i,o),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function _(e,t){const n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}}function C(e,t){const n=String(t),s=n.substr(0,8)+"..."+n.substr(-8);return new r.YAMLSemanticError(e,`The "${s}" key is too long`)}function $(e,t){for(const{afterKey:n,before:r,comment:s}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===s?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+s:t.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}function R(e,t){const n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((n=>{n.source||(n.source=t),e.errors.push(n)})),n.str):""}function B(e,t,n){const{tags:r}=e.schema,s=[];for(const i of r)if(i.tag===n){if(!i.test){const n=i.resolve(e,t);return n instanceof l?n:new a(n)}s.push(i)}const i=R(e,t);return"string"==typeof i&&s.length>0?S(i,s,r.scalarFallback):null}const j=e=>{if(!e)return!1;const{type:t}=e;return t===r.Type.MAP_KEY||t===r.Type.MAP_VALUE||t===r.Type.SEQ_ITEM};function Y(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:s,hasTag:i}=function(e,t){const n={before:[],after:[]};let s=!1,i=!1;const o=j(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:c}of o)switch(t.context.src[a]){case r.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}const{header:s,valueRange:i}=t;(i&&(a>i.start||s&&a>s.start)?n.after:n.before).push(t.context.src.slice(a+1,c));break}case r.Char.ANCHOR:if(s){const n="A node can have at most one anchor";e.push(new r.YAMLSemanticError(t,n))}s=!0;break;case r.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new r.YAMLSemanticError(t,n))}i=!0}return{comments:n,hasAnchor:s,hasTag:i}}(e.errors,t);if(s){const{anchors:n}=e,r=t.anchor,s=n.getNode(r);s&&(n.map[n.newName(r)]=s),n.map[r]=t}if(t.type===r.Type.ALIAS&&(s||i)){const n="An alias node must not specify any properties";e.errors.push(new r.YAMLSemanticError(t,n))}const o=function(e,t){const{anchors:n,errors:s,schema:i}=e;if(t.type===r.Type.ALIAS){const e=t.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return s.push(new r.YAMLReferenceError(t,n)),null}const o=new m(i);return n._cstAliases.push(o),o}const o=function(e,t){const{tag:n,type:s}=t;let i=!1;if(n){const{handle:s,suffix:o,verbatim:a}=n;if(a){if("!"!==a&&"!!"!==a)return a;const n=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new r.YAMLSemanticError(t,n))}else if("!"!==s||o)try{return function(e,t){const{handle:n,suffix:s}=t.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const s=e.getDefaults().tagPrefixes;if(s&&(i=s.find((e=>e.handle===n))),!i)throw new r.YAMLSemanticError(t,`The ${n} tag handle is non-default and was not declared.`)}if(!s)throw new r.YAMLSemanticError(t,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===s[0])return e.warnings.push(new r.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),s;if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(s){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:case r.Type.QUOTE_DOUBLE:case r.Type.QUOTE_SINGLE:return r.defaultTags.STR;case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;case r.Type.PLAIN:return i?r.defaultTags.STR:null;default:return null}}(e,t);if(o)return function(e,t,n){try{const r=B(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{const s=function({type:e}){switch(e){case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;default:return r.defaultTags.STR}}(t);if(!s)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${s}`;e.warnings.push(new r.YAMLWarning(t,i));const o=B(e,t,s);return o.tag=n,o}catch(n){const s=new r.YAMLReferenceError(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}(e,t,o);if(t.type!==r.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;return s.push(new r.YAMLSyntaxError(t,e)),null}try{return S(R(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),s.push(e),null}}(e,t);if(o){o.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(o.cstNode=t),e.options.keepNodeTypes&&(o.type=t.type);const r=n.before.join("\n");r&&(o.commentBefore=o.commentBefore?`${o.commentBefore}\n${r}`:r);const s=n.after.join("\n");s&&(o.comment=o.comment?`${o.comment}\n${s}`:s)}return t.resolved=o}const D=({context:{lineStart:e,node:t,src:n},props:s})=>{if(0===s.length)return!1;const{start:i}=s[0];if(t&&i>t.valueRange.start)return!1;if(n[i]!==r.Char.COMMENT)return!1;for(let t=e;t<i;++t)if("\n"===n[t])return!1;return!0};function F(e,t){if(!D(e))return;const n=e.getPropValue(0,r.Char.COMMENT,!0);let s=!1;const i=t.value.commentBefore;if(i&&i.startsWith(n))t.value.commentBefore=i.substr(n.length+1),s=!0;else{const r=t.value.comment;!e.node&&r&&r.startsWith(n)&&(t.value.comment=r.substr(n.length+1),s=!0)}s&&(t.comment=n)}t.Alias=m,t.Collection=l,t.Merge=v,t.Node=i,t.Pair=p,t.Scalar=a,t.YAMLMap=y,t.YAMLSeq=h,t.addComment=s,t.binaryOptions=b,t.boolOptions={trueStr:"true",falseStr:"false"},t.findPair=g,t.intOptions={asBigInt:!1},t.isEmptyPath=u,t.nullOptions={nullStr:"null"},t.resolveMap=function(e,t){if(t.type!==r.Type.MAP&&t.type!==r.Type.FLOW_MAP){const n=`A ${t.type} node cannot be resolved as a mapping`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_MAP?function(e,t){const n=[],s=[];let i,o=!1,a="{";for(let c=0;c<t.items.length;++c){const u=t.items[c];if("string"==typeof u.char){const{char:n,offset:l}=u;if("?"===n&&void 0===i&&!o){o=!0,a=":";continue}if(":"===n){if(void 0===i&&(i=null),":"===a){a=",";continue}}else if(o&&(void 0===i&&","!==n&&(i=null),o=!1),void 0!==i&&(s.push(new p(i)),i=void 0,","===n)){a=":";continue}if("}"===n){if(c===t.items.length-1)continue}else if(n===a){a=":";continue}const f=`Flow map contains an unexpected ${n}`,h=new r.YAMLSyntaxError(t,f);h.offset=l,e.errors.push(h)}else u.type===r.Type.BLANK_LINE?n.push({afterKey:!!i,before:s.length}):u.type===r.Type.COMMENT?(_(e.errors,u),n.push({afterKey:!!i,before:s.length,comment:u.comment})):void 0===i?(","===a&&e.errors.push(new r.YAMLSemanticError(u,"Separator , missing in flow map")),i=Y(e,u)):(","!==a&&e.errors.push(new r.YAMLSemanticError(u,"Indicator : missing in flow map entry")),s.push(new p(i,Y(e,u))),i=void 0,o=!1)}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];let i,o=null;for(let a=0;a<t.items.length;++a){const c=t.items[a];switch(c.type){case r.Type.BLANK_LINE:n.push({afterKey:!!i,before:s.length});break;case r.Type.COMMENT:n.push({afterKey:!!i,before:s.length,comment:c.comment});break;case r.Type.MAP_KEY:void 0!==i&&s.push(new p(i)),c.error&&e.errors.push(c.error),i=Y(e,c.node),o=null;break;case r.Type.MAP_VALUE:{if(void 0===i&&(i=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===r.Type.MAP&&!c.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new r.YAMLSemanticError(c.node,t))}let n=c.node;if(!n&&c.props.length>0){n=new r.PlainValue(r.Type.PLAIN,[]),n.context={parent:c,src:c.context.src};const e=c.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof c.range.origStart){const e=c.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new p(i,Y(e,n));F(c,a),s.push(a),i&&"number"==typeof o&&c.range.start>o+1024&&e.errors.push(C(t,i)),i=void 0,o=null}break;default:void 0!==i&&s.push(new p(i)),i=Y(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let n=a+1;;++n){const s=t.items[n];switch(s&&s.type){case r.Type.BLANK_LINE:case r.Type.COMMENT:continue e;case r.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new r.YAMLSemanticError(c,t));break e}}}if(c.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new r.YAMLSemanticError(c,t))}}}return void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t),i=new y;i.items=s,$(i,n);let o=!1;for(let n=0;n<s.length;++n){const{key:i}=s[n];if(i instanceof l&&(o=!0),e.schema.merge&&i&&"<<"===i.value){s[n]=new v(s[n]);const i=s[n].value.items;let o=null;i.some((e=>{if(e instanceof m){const{type:t}=e.source;return t!==r.Type.MAP&&t!==r.Type.FLOW_MAP&&(o="Merge nodes aliases can only point to maps")}return o="Merge nodes can only have Alias nodes as values"})),o&&e.errors.push(new r.YAMLSemanticError(t,o))}else for(let o=n+1;o<s.length;++o){const{key:n}=s[o];if(i===n||i&&n&&Object.prototype.hasOwnProperty.call(i,"value")&&i.value===n.value){const n=`Map keys must be unique; "${i}" is repeated`;e.errors.push(new r.YAMLSemanticError(t,n));break}}}if(o&&!e.options.mapAsMap){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveNode=Y,t.resolveSeq=function(e,t){if(t.type!==r.Type.SEQ&&t.type!==r.Type.FLOW_SEQ){const n=`A ${t.type} node cannot be resolved as a sequence`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_SEQ?function(e,t){const n=[],s=[];let i,o=!1,a=null,c="[",u=null;for(let l=0;l<t.items.length;++l){const f=t.items[l];if("string"==typeof f.char){const{char:n,offset:h}=f;if(":"===n||!o&&void 0===i||(o&&void 0===i&&(i=c?s.pop():null),s.push(new p(i)),o=!1,i=void 0,a=null),n===c)c=null;else if(c||"?"!==n){if("["!==c&&":"===n&&void 0===i){if(","===c){if(i=s.pop(),i instanceof p){const n="Chaining flow sequence pairs is invalid",s=new r.YAMLSemanticError(t,n);s.offset=h,e.errors.push(s)}if(!o&&"number"==typeof a){const n=f.range?f.range.start:f.offset;n>a+1024&&e.errors.push(C(t,i));const{src:s}=u.context;for(let t=a;t<n;++t)if("\n"===s[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new r.YAMLSemanticError(u,t));break}}}else i=null;a=null,o=!1,c=null}else if("["===c||"]"!==n||l<t.items.length-1){const s=`Flow sequence contains an unexpected ${n}`,i=new r.YAMLSyntaxError(t,s);i.offset=h,e.errors.push(i)}}else o=!0}else if(f.type===r.Type.BLANK_LINE)n.push({before:s.length});else if(f.type===r.Type.COMMENT)_(e.errors,f),n.push({comment:f.comment,before:s.length});else{if(c){const t=`Expected a ${c} in flow sequence`;e.errors.push(new r.YAMLSemanticError(f,t))}const t=Y(e,f);void 0===i?(s.push(t),u=f):(s.push(new p(i,t)),i=void 0),a=f.range.start,c=","}}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];for(let i=0;i<t.items.length;++i){const o=t.items[i];switch(o.type){case r.Type.BLANK_LINE:n.push({before:s.length});break;case r.Type.COMMENT:n.push({comment:o.comment,before:s.length});break;case r.Type.SEQ_ITEM:if(o.error&&e.errors.push(o.error),s.push(Y(e,o.node)),o.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new r.YAMLSemanticError(o,t))}break;default:o.error&&e.errors.push(o.error),e.errors.push(new r.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:n,items:s}}(e,t),i=new h;if(i.items=s,$(i,n),!e.options.mapAsMap&&s.some((e=>e instanceof p&&e.key instanceof l))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveString=R,t.strOptions=w,t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let n=t-(s.length-e-1);for(;n-- >0;)s+="0"}return s},t.stringifyString=function(e,t,n,s){const{defaultType:i}=w,{implicitKey:o,inFlow:a}=t;let{type:c,value:u}=e;"string"!=typeof u&&(u=String(u),e=Object.assign({},e,{value:u}));const l=i=>{switch(i){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return k(e,t,n,s);case r.Type.QUOTE_DOUBLE:return x(u,t);case r.Type.QUOTE_SINGLE:return P(u,t);case r.Type.PLAIN:return function(e,t,n,s){const{comment:i,type:o,value:a}=e,{actualString:c,implicitKey:u,indent:l,inFlow:f}=t;if(u&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return x(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?P(a,t):x(a,t):k(e,t,n,s);if(!u&&!f&&o!==r.Type.PLAIN&&-1!==a.indexOf("\n"))return k(e,t,n,s);if(""===l&&M(a))return t.forceBlockIndent=!0,k(e,t,n,s);const h=a.replace(/\n+/g,`$&\n${l}`);if(c){const{tags:e}=t.doc.schema;if("string"!=typeof S(h,e,e.scalarFallback).value)return x(a,t)}const p=u?h:T(h,l,O,L(t));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,l,i))}(e,t,n,s);default:return null}};c!==r.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(u)?c=r.Type.QUOTE_DOUBLE:!o&&!a||c!==r.Type.BLOCK_FOLDED&&c!==r.Type.BLOCK_LITERAL||(c=r.Type.QUOTE_DOUBLE);let f=l(c);if(null===f&&(f=l(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},t.toJSON=o},125:(e,t,n)=>{"use strict";var r=n(487),s=n(314);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=s.resolveString(e,t);if("function"==typeof Buffer)return Buffer.from(n,"base64");if("function"==typeof atob){const e=atob(n.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}{const n="This environment does not support reading binary tags; either Buffer or atob is required";return e.errors.push(new r.YAMLReferenceError(t,n)),null}},options:s.binaryOptions,stringify:({comment:e,type:t,value:n},i,o,a)=>{let c;if("function"==typeof Buffer)c=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);c=btoa(e)}}if(t||(t=s.binaryOptions.defaultType),t===r.Type.QUOTE_DOUBLE)n=c;else{const{lineWidth:e}=s.binaryOptions,i=Math.ceil(c.length/e),o=new Array(i);for(let t=0,n=0;t<i;++t,n+=e)o[t]=c.substr(n,e);n=o.join(t===r.Type.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:n},i,o,a)}};function o(e,t){const n=s.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let i=n.items[e];if(!(i instanceof s.Pair)){if(i instanceof s.YAMLMap){if(i.items.length>1){const e="Each pair must have its own sequence indicator";throw new r.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;i.commentBefore&&(e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore),i.comment&&(e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment),i=e}n.items[e]=i instanceof s.Pair?i:new s.Pair(i)}}return n}function a(e,t,n){const r=new s.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(2!==s.length)throw new TypeError(`Expected [key, value] tuple: ${s}`);t=s[0],i=s[1]}else if(s&&s instanceof Object){const e=Object.keys(s);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${s}`);t=e[0],i=s[t]}else t=s;const o=e.createPair(t,i,n);r.items.push(o)}return r}const c={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:a};class u extends s.YAMLSeq{constructor(){super(),r._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this)),r._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this)),r._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this)),r._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this)),r._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this)),this.tag=u.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,i;if(e instanceof s.Pair?(r=s.toJSON(e.key,"",t),i=s.toJSON(e.value,r,t)):r=s.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}}r._defineProperty(u,"tag","tag:yaml.org,2002:omap");const l={identify:e=>e instanceof Map,nodeClass:u,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=o(e,t),i=[];for(const{key:e}of n.items)if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new r.YAMLSemanticError(t,e)}i.push(e.value)}return Object.assign(new u,n)},createNode:function(e,t,n){const r=a(e,t,n),s=new u;return s.items=r.items,s}};class f extends s.YAMLMap{constructor(){super(),this.tag=f.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);s.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=s.findPair(this.items,e);return!t&&n instanceof s.Pair?n.key instanceof s.Scalar?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=s.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new s.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw new Error("Set items must all have null values")}}r._defineProperty(f,"tag","tag:yaml.org,2002:set");const h={identify:e=>e instanceof Set,nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=s.resolveMap(e,t);if(!n.hasAllNullValues())throw new r.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new f,n)},createNode:function(e,t,n){const r=new f;for(const s of t)r.items.push(e.createPair(s,null,n));return r}},p=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},d=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},m={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},y={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(e,t,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let u=Date.UTC(t,n-1,r,s||0,i||0,o||0,a||0);if(c&&"Z"!==c){let e=p(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function v(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function b(e,t){if(v(!1)){const n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?`${t}: ${e}`:e)}}const w={};t.binary=i,t.floatTime=g,t.intTime=m,t.omap=l,t.pairs=c,t.set=h,t.timestamp=y,t.warn=b,t.warnFileDeprecation=function(e){v(!0)&&b(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")},t.warnOptionDeprecation=function(e,t){if(!w[e]&&v(!0)){w[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",b(n,"DeprecationWarning")}}},78:(e,t,n)=>{e.exports=n(667).YAML}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FtpClient:()=>F,FtpClientPool:()=>W,JsonStorage:()=>S,PuboFileSystem:()=>z,RosTopic:()=>Ce,RosTopicManager:()=>$e,SIGKILL:()=>ue,createRpcClient:()=>G,getNetworks:()=>Se,getProcessByPpid:()=>me,getProcessCommandByPid:()=>de,getProcessCpuUseByPid:()=>pe,getProcessName:()=>he,getProcessTree:()=>ge,getWifiName:()=>we,isPortAvailable:()=>ve,isProcessDied:()=>fe,pitch:()=>be});const e=require("fs");function t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function s(){}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?s:String(s)),r)}var s}var o=function(){function e(){this.cache=[],this.running=!1,this.len=0}var n,r,o=e.prototype;return o._run=function(e){var n,r,s=e.fn,i=e.promise;try{return t((n=function(e,t){try{var n=function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(s,(function(e){i.resolve(e)}))}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,(function(e){i.reject(e)})),r=function(){s=null,i=null},n&&n.then?n.then(r):r()))}catch(e){return Promise.reject(e)}},o.run=function(){try{var e=this;if(e.cache.length<1)return e.running=!1,t();e.running=!0;var n=e.cache.shift();return e.len-=1,t((r=function(){e.run()},(i=function(){if("function"==typeof n.fn)return(t=e._run(n))&&t.then?t.then(s):Promise.resolve();var t}())&&i.then?i.then(r):r()))}catch(e){return Promise.reject(e)}var r,i},o.push=function(e){var t=this;return this.len+=1,new Promise((function(n,r){t.cache.push({fn:e,promise:{resolve:n,reject:r}}),t.running||t.run()}))},n=e,(r=[{key:"length",get:function(){return this.len}}])&&i(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();const a=require("crypto");var c=n.n(a);const u={randomUUID:c().randomUUID},l=new Uint8Array(256);let f=l.length;function h(){return f>l.length-16&&(c().randomFillSync(l),f=0),l.slice(f,f+=16)}const p=[];for(let e=0;e<256;++e)p.push((e+256).toString(16).slice(1));const d=function(e,t,n){if(u.randomUUID&&!t&&!e)return u.randomUUID();const r=(e=e||{}).random||(e.rng||h)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]}(r)};function m(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var g=n(1);function y(){}var v=function(){function t(e,t){var n=this;this.path=void 0,this._state={},this.queue=new o,this.key=void 0,this.defaultState=void 0,this.path=e,this.defaultState=t,this.key=encodeURIComponent(e),g.on("online",(function(e){e.on("message",(function(t){return n.onMessage(t,e)}))})),this.restore()}var n=t.prototype;return n.onMessage=function(e,t){try{var n,r=this;return e.key!==r.key?m():m((s=function(){t.send({uid:e.uid,key:r.key,payload:n})},(i="get"===e.type?m(r.getState(),(function(e){n=e})):function(e){var t=e();if(t&&t.then)return t.then(y)}((function(){if("set"===e.type)return m(r.setState(e.payload),(function(e){n=e}))})))&&i.then?i.then(s):s()))}catch(e){return Promise.reject(e)}var s,i},n.sync=function(){try{var e=this;return e.queue.length>0?m():m(w(e.queue.push(e._syncFile.bind(e))))}catch(e){return Promise.reject(e)}},n._syncFile=function(){try{var t=this;return m(new Promise((function(n,r){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?r(e):n("")}))})))}catch(e){return Promise.reject(e)}},n.restore=function(){try{var t=(0,e.readFileSync)(this.path);this._state=JSON.parse(t.toString())}catch(t){var n,r="win32"===process.platform?"\\":"/";r&&(0,e.mkdirSync)(this.path.split(r).slice(0,-1).join(r),{recursive:!0}),this.setState(null!=(n=this.defaultState)?n:{})}},n.getState=function(){try{return m(this._state)}catch(e){return Promise.reject(e)}},n.setState=function(e){try{return this._state=e,m(w(this.sync()))}catch(e){return Promise.reject(e)}},t}(),b=function(){function e(e){this.key=void 0,this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}var t=e.prototype;return t.onMessage=function(e){e.key===this.key&&"function"==typeof this.callback[e.uid]&&(this.callback[e.uid](e.payload),delete this.callback[e.uid])},t.call=function(e){var t=e.type,n=e.payload;try{var r=this;return m(new Promise((function(e){var s=d();r.callback[s]=function(t){return e(t)},process.send({uid:s,type:t,payload:n,key:r.key})})))}catch(e){return Promise.reject(e)}},t.getState=function(){try{return m(this.call({type:"get",payload:{}}))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return m(this.call({type:"set",payload:e}))}catch(e){return Promise.reject(e)}},e}();function w(e,t){if(!t)return e&&e.then?e.then(y):Promise.resolve()}var S=function(){function e(e,t){var n;void 0===t&&(t={}),this.instance=void 0,g.isPrimary?this.instance=new v(e,t.defaultState):this.instance=new b(e),null!=(n=t)&&n.initialState&&this.merge(t.initialState)}var t=e.prototype;return t.getState=function(){try{return m(this.instance.getState())}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return m(this.instance.setState(e))}catch(e){return Promise.reject(e)}},t.get=function(e){try{return e?m(this.getState(),(function(t){return t[e]})):m(this.getState())}catch(e){return Promise.reject(e)}},t.set=function(e,t){try{var n=this;return m(n.getState(),(function(r){return r[e]=t,w(n.setState(r))}))}catch(e){return Promise.reject(e)}},t.merge=function(e){try{var t=this;return m(t.getState(),(function(n){for(var r=0,s=Object.keys(e);r<s.length;r++){var i=s[r];n[i]=e[i]}return w(t.setState(n))}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return m(t.getState(),(function(n){return delete n[e],w(t.setState(n))}))}catch(e){return Promise.reject(e)}},e}(),O=function(e){void 0===e&&(e=8);var t=function(e){return Math.random().toString(32).slice(2,2+e)};if(e<=8)return t(e);for(var n="",r=0;r<=e;r+=8)n+=t(e-r>8?8:e-r);return n};function E(){}var N,A=(N=function(e){return(t=new Promise((function(t){return setTimeout(t,e)})))&&t.then?t.then(E):Promise.resolve();var t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(N.apply(this,e))}catch(e){return Promise.reject(e)}});function T(){}function L(e,t,n){if(n)return t?t(e()):e();try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}var M=function(e,t){var n=!0,r=function(){n=!1},s=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return o=function(){return o=function(){n?s():(s=null,e=null,r=null,n=null,t=null)},(i=A(t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o},(i=function(t,n){try{var r=L(e,T,s)}catch(e){return n(e)}var s;return r&&r.then?r.then(void 0,n):r}(0,(function(e){console.log(e)})))&&i.then?i.then(o):o();var i,o}));return s(),r},x=function(e,t){var n=void 0===t?{}:t,r=n.checkTime,s=n.timeout;return new Promise((function(t,n){var i=M((function(){return L(e,(function(n){n&&("function"==typeof i&&i(),t(n),i=null,e=null,t=null)}))}),r||100);s&&setTimeout((function(){"function"==typeof i&&i(),n("timeout"),n=null,i=null,e=null}),s)}))},P=["driver"],k=["maxConnection"];function I(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function C(){}function $(e,t){if(!t)return e&&e.then?e.then(C):Promise.resolve()}function R(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}function j(e,t){if(null==e)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(s[n]=e[n]);return s}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?s:String(s)),r)}var s}function D(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var F=function(){function e(e){var t=e.driver,n=j(e,P);this.driver=void 0,this.options=void 0,this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this.client=void 0,this._len=0,this.id=O(),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.driver=t,this.options=n}var t=e.prototype;return t.connect=function(){try{var e=!1,t=this;return t.client||(t.client=new t.driver),t.state.destroyed=!1,I(_((function(){if(t.state.connecting)return I(x((function(){return t.state.connected}),{checkTime:1e3,timeout:1e4}),(function(){return e=!0,"connected"}))}),(function(n){return e?n:(t.state.connecting=!0,new Promise((function(e,n){t.client.once("ready",(function(){t.state.connected=!0,e("connected"),t.state.connecting=!1})),t.client.once("error",(function(e){n(e),t.close()})),t.client.connect(B({},t.options))})))})))}catch(e){return Promise.reject(e)}},t.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},t.run=function(e){var t=e.fn,n=e.args;try{var r=this;return r.len+=1,I(_((function(){if(!r.state.connected)return $(r.connect())}),(function(){return _((function(){if(r.state.running)return $(x((function(){return!r.state.running}),{checkTime:1e3,timeout:6e6}))}),(function(){return r.state.running=!0,new Promise((function(e,s){var i;(i=r.client)[t].apply(i,n.concat([function(t,n){t?s(t):e(n)}]))}))}))})))}catch(e){return Promise.reject(e)}},t.bind=function(e){var t=this;return R((function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return I(t.run({fn:e,args:r}),(function(e){return t.state.running=!1,t.len-=1,e}))}))},t.get=function(){try{for(var e=this,t=Buffer.alloc(0),n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return I(e.run({fn:"get",args:r}),(function(n){return new Promise((function(r){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){r(t),e.state.running=!1,e.len-=1}))}))}))}catch(e){return Promise.reject(e)}},D(e,[{key:"len",get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()}}]),e}(),W=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,r=j(e,k);this.options=void 0,this.maxConnection=void 0,this.pool=[],this.get=this.bind("get"),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.options=r,this.maxConnection=n}return e.prototype.bind=function(e){var t=this;return R((function(){var n=t.client;return I(n[e].apply(n,arguments),(function(e){if(n.len<1){var r=t.pool.findIndex((function(e){return e.id===n.id}));t.pool.splice(r,1)}return e}))}))},D(e,[{key:"len",get:function(){return this.pool.length}},{key:"client",get:function(){if(this.pool.length<this.maxConnection){var e=new F(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]}}]),e}();function U(){}function K(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function q(e){return e}var J=function(){function e(e){var t,n=e.url,r=e.options,s=void 0===r?{}:r,i=e.Grpc,o=e.cert;this.url=void 0,this.options=void 0,this.Grpc=void 0,this.credentials=void 0,this.client=void 0,this._timeout=void 0,this.connections=0,this.closing=!1;var a=Q({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},s),c=o?i.credentials.createSsl(o):i.credentials.createInsecure();this.url=n,this.Grpc=i,this.credentials=c,this.options=a,this.options.timeout=null!=(t=this.options.timeout)?t:6e4}var t=e.prototype;return t.request=function(e,t,n){try{var r=this;return K((s=function(){if(r.closing)return e=x(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return!r.closing})),{checkTime:100,timeout:2e4}),e&&e.then?e.then(U):Promise.resolve();var e},i=function(){var s;r.connections+=1,r.client||(r.client=new r.Grpc.Client(r.url,r.credentials,r.options));var i,o,a=Buffer.alloc(0);return i=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return K(r._request({service:e,method:t,data:n}),(function(e){a=e}))}),(function(e){s=e})),o=function(){if(r.connections-=1,r.connections<0&&(r.connections=0),r.connections<1&&(r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r._timeout=setTimeout((function(){return r.close()}),6e4)),s)throw r.restart(),new Error("grpc connection error.");return a},i&&i.then?i.then(o):o()},(o=s())&&o.then?o.then(i):i()))}catch(e){return Promise.reject(e)}var s,i,o},t._request=function(e){var t=this,n=e.service,r=e.method,s=e.data;return new Promise((function(e,i){var o=!1,a=setTimeout((function(){o=!0,t.restart(),console.log("rpc request timeout"),i(new Error("timeout"))}),t.options.timeout),c=function(t,n){o||(clearTimeout(a),t?i(t):e(n),c=null)};t.client.makeUnaryRequest("/"+n+"/"+r,q,q,s,c)}))},t.restart=function(){try{var e=this;return e.closing?K():(console.log("rpc client restarting."),e.closing=!0,e.close(),K(A(2e3),(function(){e.closing=!1})))}catch(e){return Promise.reject(e)}},t.close=function(){var e;null==(e=this.client)||e.close(),this.client=null,delete this.client},e}(),V=[];function G(e){var t=e.url,n=e.options,r=void 0===n?{}:n,s=e.ServiceImp,i=e.Grpc,o=e.cert,a=new J({url:t,options:r,Grpc:i,cert:o});return V.push(a),new s({request:a.request.bind(a)})}var H=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Promise((function(t,r){e.apply(void 0,n.concat([function(e){e&&r(e);for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];s.length<2?t(s[0]):t([].concat(s))}]))}))}},z={read:H(e.read),readFile:H(e.readFile),writeFile:H(e.writeFile),readdir:H(e.readdir),open:H(e.open),close:H(e.close),write:H(e.write),stat:H(e.stat)};const Z=require("child_process");function X(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ee(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var te="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ne(e,t,n){if(!e.s){if(n instanceof re){if(!n.s)return void(n.o=ne.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(ne.bind(null,e,t),ne.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var re=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,s=this.s;if(s){var i=1&s?t:n;if(i){try{ne(r,1,i(this.v))}catch(e){ne(r,2,e)}return r}return this}return this.o=function(e){try{var s=e.v;1&e.s?ne(r,1,t?t(s):s):n?ne(r,1,n(s)):ne(r,2,s)}catch(e){ne(r,2,e)}},r},e}();function se(e){return e instanceof re&&1&e.s}function ie(e,t,n){if("function"==typeof e[te]){var r,s,i,o=e[te]();if(function e(a){try{for(;!((r=o.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!se(a))return void a.then(e,i||(i=ne.bind(null,s=new re,2)));a=a.v}s?ne(s,1,a):s=a}catch(e){ne(s||(s=new re),2,e)}}(),o.return){var a=function(e){try{r.done||o.return()}catch(e){}return e};if(s&&s.then)return s.then(a,(function(e){throw a(e)}));a()}return s}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],u=0;u<e.length;u++)c.push(e[u]);return function(e,t,n){var r,s,i=-1;return function o(a){try{for(;++i<e.length&&(!n||!n());)if((a=t(i))&&a.then){if(!se(a))return void a.then(o,s||(s=ne.bind(null,r=new re,2)));a=a.v}r?ne(r,1,a):r=a}catch(e){ne(r||(r=new re),2,e)}}(),r}(c,(function(e){return t(c[e])}),n)}function oe(e,t){return e&&e.then?e.then(t):t(e)}function ae(){}function ce(e,t){if(!t)return e&&e.then?e.then(ae):Promise.resolve()}var ue=ee((function(e,t){return void 0===t&&(t=2),"win32"===process.platform?new Promise((function(t,n){(0,Z.exec)("taskkill /pid "+e+" /T /F",(function(e){e?n(e):t("")}))})):X(ge(e),(function(e){var n=[e.pid];return ye(e,n),n.reverse(),oe(ie(n,(function(e){return ce(le(e,t))})),(function(){return"success"}))}))})),le=ee((function(e,t,n){if(void 0===t&&(t=2),void 0===n&&(n=1),n>5)throw new Error("SIGKILL 失败. times > 5");if("win32"!==process.platform)return(0,Z.exec)("kill -"+t+" "+e),function(e){if(e&&e.then)return e.then(ae)}(function(t,n){try{var r=ce(x((function(){return fe(e)}),{checkTime:1e3,timeout:1e4}))}catch(e){return n()}return r&&r.then?r.then(void 0,n):r}(0,(function(){return ce(le(e,9,n+1))})));process.kill(e,t)})),fe=ee((function(e){return X(pe(e),(function(e){return e<0}))}));function he(e){return new Promise((function(t,n){(0,Z.exec)('grep "Name:" /proc/'+e+"/status",(function(e,r){e?n(e):t(r)}))}))}function pe(e){return new Promise((function(t){(0,Z.exec)("ps -p "+e+" -o %cpu=",(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function de(e){return new Promise((function(t){(0,Z.exec)("ps -p "+e+" -o command=",(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function me(e){return new Promise((function(t){(0,Z.exec)("ps -o pid --no-headers --ppid "+e,(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var ge=ee((function(e,t){return t||(t={pid:e,children:[]}),X(me(e),(function(e){return oe(ie(e,(function(e){var n={pid:e,children:[]};return X(ge(e,n),(function(){t.children.push(n)}))})),(function(){return t}))}))})),ye=function e(t,n){t.children&&(n.push.apply(n,t.children.map((function(e){return e.pid}))),t.children.forEach((function(t){return e(t,n)})))},ve=function(e){return new Promise((function(t){var r=n(808).createServer();r.listen(e,(function(){t(!0),r.close()})),r.on("error",(function(){t(!1),r.close()}))}))},be=function(){process.on("uncaughtException",(function(e){return console.log(e)})),process.on("unhandledRejection",(function(e){return console.log(e)})),global.require=n(649),global.exports=exports,global._0x2f=function(e){return e.map((function(e){return String.fromCharCode(e)})).reduce((function(e,t){return e+t}))},global._0x3c=function(e){return n(649)(global._0x2f(e))}},we=function(){return function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(Se,(function(e){var t=e.find((function(e){return"Wireless interface"===e.description}));return t?t["logical name"]:""}))},Se=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return new Promise((function(e){var t;null==(t=(0,Z.exec)("lshw -C network").stdout)||t.on("data",(function(t){e(function(e){return e.toString().replace(/\*-network.*\n/g,"-----").split("-----").filter((function(e){return e.trim()})).map((function(e){var t={};return e.split("\n").forEach((function(e){var n=e.split(":").map((function(e){return e.trim()}));n[0]&&n[1]&&(t[n[0]]=n[1])})),t}))}(t))}))}))}));function Oe(){}function Ee(e){var t=e();if(t&&t.then)return t.then(Oe)}var Ne="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Ae(e,t,n){if(!e.s){if(n instanceof Te){if(!n.s)return void(n.o=Ae.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Ae.bind(null,e,t),Ae.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Te=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,s=this.s;if(s){var i=1&s?t:n;if(i){try{Ae(r,1,i(this.v))}catch(e){Ae(r,2,e)}return r}return this}return this.o=function(e){try{var s=e.v;1&e.s?Ae(r,1,t?t(s):s):n?Ae(r,1,n(s)):Ae(r,2,s)}catch(e){Ae(r,2,e)}},r},e}();function Le(e){return e instanceof Te&&1&e.s}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pe=function(){function e(){this.state={},this.ids={}}var t=e.prototype;return t.on=function(e,t){if(this.state[e]||(this.state[e]=[]),"function"!=typeof t)throw new Error("第二个参数必须为function!");var n=this.state[e].push(t)-1,r=O(40);return this.ids[r]={event:e,index:n},r},t.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},r=n.event,s=n.index;r&&Array.isArray(this.state[r])&&(this.state[r].splice(s,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===r&&t.ids[e].index>s&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},t.clear=function(){this.state.length=0},t.emit=function(e,t){if(Array.isArray(this.state[e]))for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.state[e]);!(n=r()).done;){var s=n.value;"function"==typeof s&&s(t)}},t.emitSync=function(e,t){try{var n=this;return(r=Ee((function(){if(Array.isArray(n.state[e]))return function(e){if(e&&e.then)return e.then(Oe)}(function(e,t,n){if("function"==typeof e[Ne]){var r,s,i,o=e[Ne]();if(function e(a){try{for(;!((r=o.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!Le(a))return void a.then(e,i||(i=Ae.bind(null,s=new Te,2)));a=a.v}s?Ae(s,1,a):s=a}catch(e){Ae(s||(s=new Te),2,e)}}(),o.return){var a=function(e){try{r.done||o.return()}catch(e){}return e};if(s&&s.then)return s.then(a,(function(e){throw a(e)}));a()}return s}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],u=0;u<e.length;u++)c.push(e[u]);return function(e,t,n){var r,s,i=-1;return function o(a){try{for(;++i<e.length&&(!n||!n());)if((a=t(i))&&a.then){if(!Le(a))return void a.then(o,s||(s=Ae.bind(null,r=new Te,2)));a=a.v}r?Ae(r,1,a):r=a}catch(e){Ae(r||(r=new Te),2,e)}}(),r}(c,(function(e){return t(c[e])}),n)}(n.state[e],(function(e){return Ee((function(){if("function"==typeof e)return function(e,t){return e&&e.then?e.then(Oe):Promise.resolve()}(e(t))}))})))})))&&r.then||(r=Promise.resolve(r)),r}catch(e){return Promise.reject(e)}var r},t.clone=function(){return{state:Me({},this.state),ids:Me({},this.ids)}},t.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),ke=function(){function e(e){var t=e.limit,n=void 0===t?10:t,r=e.onTimeout;this.limit=10,this.onTimeout=void 0,this.timeout=null,this.limit=n,this.onTimeout=r}var t=e.prototype;return t.feed=function(){this.init()},t.init=function(){var e=this;clearTimeout(this.timeout),delete this.timeout,this.timeout=setTimeout((function(){return e.onTimeout()}),1e3*this.limit)},t.stop=function(){this.timeout&&clearTimeout(this.timeout)},e}(),Ie=function(){function e(e){this._splitSymbol=void 0,this._cache="",this._splitSymbol=e}return e.prototype.split=function(e){var t=(this._cache+e).split(this._splitSymbol);return this._cache=t.splice(t.length-1,1)[0],t},e}(),_e=n(78),Ce=function(){function e(e,t){this.topic=void 0,this.messageType=void 0,this.emitter=new Pe,this.subscribed=!1,this.dog=new ke({limit:60,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new Ie("---"),this.subscribeChildProcess=void 0,this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new Pe}var t=e.prototype;return t.onTimeout=function(){this.subscribed&&(this.unsubscribe(),this.subscribe())},t.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){var n=_e.parse(t);this.emitter.emit("message",n)}},t.subscribe=function(){this.subscribeChildProcess||(this.subscribed=!0,this.subscribeChildProcess=(0,Z.spawn)("rostopic",["echo",this.topic]),this.subscribeChildProcess.stdout.on("data",this.onData.bind(this)),this.dog.init())},t.unsubscribe=function(){this.subscribeChildProcess||(this.dog.stop(),this.subscribed=!1,ue(this.subscribeChildProcess.pid),this.subscribeChildProcess=null)},t.publish=function(e){var t=this,n=_e.stringify(e);return new Promise((function(e,r){(0,Z.exec)("rostopic pub -1 "+t.topic+" "+t.messageType+' "'+n+'"',(function(t,n){t?r(t):e(n)}))}))},e}(),$e={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var r=new Ce(e,t);return this.cache.push(r),r}}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["pubo-node"]=t():e["pubo-node"]=t()}(this,(()=>(()=>{var e={649:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=649,e.exports=t},1:e=>{"use strict";e.exports=require("cluster")},808:e=>{"use strict";e.exports=require("net")},453:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(359);const o={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:r.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:r.defaultTagPrefix}]}};function c(e,t){if("1.0"===(e.version||e.options.version)){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,"")}`}let n=e.tagPrefixes.find((e=>0===t.indexOf(e.prefix)));if(!n){const r=e.getDefaults().tagPrefixes;n=r&&r.find((e=>0===t.indexOf(e.prefix)))}if(!n)return"!"===t[0]?t:`!<${t}>`;const r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,(e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e])));return n.handle+r}function u(e,t,n,r){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);t||(t=i.newName(),i.map[t]=e.source)}}if(e instanceof s.Pair)return e.toString(t,n,r);a||(a=function(e,t){if(t instanceof s.Alias)return s.Alias;if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))||n[0]}let n,r;if(t instanceof s.Scalar){r=t.value;const s=e.filter((e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class));n=s.find((e=>e.format===t.format))||s.find((e=>!e.format))}else r=t,n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass));if(!n){const e=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}(o.tags,e));const u=function(e,t,{anchors:n,doc:r}){const s=[],i=r.anchors.getName(e);return i&&(n[i]=e,s.push(`&${i}`)),e.tag?s.push(c(r,e.tag)):t.default||s.push(c(r,t.tag)),s.join(" ")}(e,a,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(e,t,n,r):e instanceof s.Scalar?s.stringifyString(e,t,n,r):e.toString(t,n,r);return u?e instanceof s.Scalar||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${t.indent}${l}`:l}class l{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){r._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new s.Alias(e)}createMergePair(...e){const t=new s.Merge;return t.value.items=e.map((e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}getName(e){const{map:t}=this;return Object.keys(t).find((n=>t[n]===e))}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);const t=Object.keys(this.map);for(let n=1;;++n){const r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach((t=>{e[t]=e[t].resolved})),t.forEach((e=>{e.source=e.source.resolved})),delete this._cstAliases}setAnchor(e,t){if(null!=e&&!l.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(t&&/[\x00-\x19\s,[\]{}]/.test(t))throw new Error("Anchor names must not contain whitespace or control characters");const{map:n}=this,r=e&&Object.keys(n).find((t=>n[t]===e));if(r){if(!t)return r;r!==t&&(delete n[r],n[t]=e)}else{if(!t){if(!e)return null;t=this.newName()}n[t]=e}return t}}const f=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof s.Collection?(n&&(t[n]=!0),e.items.forEach((e=>f(e,t)))):e instanceof s.Pair?(f(e.key,t),f(e.value,t)):e instanceof s.Scalar&&n&&(t[n]=!0)}return t};function h({tagPrefixes:e},t){const[n,s]=t.parameters;if(!n||!s){const e="Insufficient parameters given for %TAG directive";throw new r.YAMLSemanticError(t,e)}if(e.some((e=>e.handle===n))){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new r.YAMLSemanticError(t,e)}return{handle:n,prefix:s}}function p(e,t){let[n]=t.parameters;if("YAML:1.0"===t.name&&(n="1.0"),!n){const e="Insufficient parameters given for %YAML directive";throw new r.YAMLSemanticError(t,e)}if(!a[n]){const s=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${n}`;e.warnings.push(new r.YAMLWarning(t,s))}return n}function d(e){if(e instanceof s.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class m{constructor(e){this.anchors=new l(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return d(this.contents),this.contents.add(e)}addIn(e,t){d(this.contents),this.contents.addIn(e,t)}delete(e){return d(this.contents),this.contents.delete(e)}deleteIn(e){return s.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(d(this.contents),this.contents.deleteIn(e))}getDefaults(){return m.defaults[this.version]||m.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):void 0}getIn(e,t){return s.isEmptyPath(e)?!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents:this.contents instanceof s.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof s.Collection&&this.contents.has(e)}hasIn(e){return s.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof s.Collection&&this.contents.hasIn(e)}set(e,t){d(this.contents),this.contents.set(e,t)}setIn(e,t){s.isEmptyPath(e)?this.contents=t:(d(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);const n=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:i=[],directivesEndMarker:o,error:a,valueRange:c}=e;if(a&&(a.source||(a.source=this),this.errors.push(a)),function(e,t,n){const s=[];let i=!1;for(const n of t){const{comment:t,name:o}=n;switch(o){case"TAG":try{e.tagPrefixes.push(h(e,n))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new r.YAMLSemanticError(n,t))}try{e.version=p(e,n)}catch(t){e.errors.push(t)}i=!0;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new r.YAMLWarning(n,t))}}t&&s.push(t)}if(n&&!i&&"1.1"===(e.version||n.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=n.tagPrefixes.map(t),e.version=n.version}e.commentBefore=s.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=c?[c.start,c.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let i,o=!1;for(const a of t)if(a.valueRange){if(void 0!==i){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new r.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);o&&(t.spaceBefore=!0,o=!1),i=t}else null!==a.comment?(void 0===i?n.before:n.after).push(a.comment):a.type===r.Type.BLANK_LINE&&(o=!0,void 0===i&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=i||null,i){const t=n.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof r.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof r.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=this.contents,Object.keys(f(e,{}))).filter((e=>0!==e.indexOf(i.Schema.defaultPrefix)));var e}setTagPrefix(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){const n=this.tagPrefixes.find((t=>t.handle===e));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((t=>t.handle!==e))}toJSON(e,t){const{keepBlobsInJSON:n,mapAsMap:r,maxAliasCount:i}=this.options,o=n&&("string"!=typeof e||!(this.contents instanceof s.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!r,maxAliasCount:i,stringify:u},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const l=s.toJSON(this.contents,e,a);if("function"==typeof t&&a.anchors)for(const{count:e,res:n}of a.anchors.values())t(n,e);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let n=!1;if(this.version){let e="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?e="%YAML:1.0":"1.1"===this.version&&(e="%YAML 1.1")),t.push(e),n=!0}const r=this.listNonDefaultTags();this.tagPrefixes.forEach((({handle:e,prefix:s})=>{r.some((e=>0===e.indexOf(s)))&&(t.push(`%TAG ${e} ${s}`),n=!0)})),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:u};let o=!1,a=null;if(this.contents){this.contents instanceof s.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);const e=a?null:()=>o=!0,r=u(this.contents,i,(()=>a=null),e);t.push(s.addComment(r,"",a))}else void 0!==this.contents&&t.push(u(this.contents,i));return this.comment&&(o&&!a||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}r._defineProperty(m,"defaults",a),t.Document=m,t.defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},t.scalarOptions=o},487:(e,t)=>{"use strict";const n={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},r={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function s(e){const t=[0];let n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function i(e){let t,n;return"string"==typeof e?(t=s(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=s(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function o(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=i(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){const r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}const s=n.length;return{line:s,col:e-n[s-1]+1}}class a{static copy(e){return new a(e.start,e.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let s=t;for(;s<e.length&&!(e[s]>n);)++s;this.origStart=n+s;const i=s;for(;s<e.length&&!(e[s]>=r);)++s;return this.origEnd=r+s,i}}class c{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=c.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,r){const s=e[t];if(!s)return!0;const i=e[t-1];if(i&&"\n"!==i)return!1;if(r){if(s!==r)return!1}else if(s!==n.DIRECTIVES_END&&s!==n.DOCUMENT_END)return!1;const o=e[t+1],a=e[t+2];if(o!==s||a!==s)return!1;const c=e[t+3];return!c||"\n"===c||"\t"===c||" "===c}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,s=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===s.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(e,t,n){const r=c.endOfIndent(e,n);if(r>n+t)return r;{const t=c.endOfWhiteSpace(e,r),n=e[t];if(!n||"\n"===n)return t}return null}static atBlank(e,t,n){const r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(e,t){const n=e[t];return n?"\n"!==n&&"\n"===e[t-1]?t-1:c.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,s=!1,i="",o=e[t+1];for(;" "===o||"\t"===o||"\n"===o;){switch(o){case"\n":r=0,t+=1,i+="\n";break;case"\t":r<=n&&(s=!0),t=c.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}o=e[t+1]}return i||(i=" "),o&&r<=n&&(s=!0),{fold:i,offset:t,error:s}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;const{src:r}=this.context,s=this.props[e];return s&&r[s.start]===t?r.slice(s.start+(n?1:0),s.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const r=this.getPropValue(t,n.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return!1;if(!this.valueRange)return!1;const{end:n}=this.valueRange;return e!==n||c.atBlank(t,n-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]===n.COMMENT)return!0}return!1}get hasProps(){if(this.context){const{src:e}=this.context;for(let t=0;t<this.props.length;++t)if(e[this.props[t].start]!==n.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[r.FLOW_MAP,r.FLOW_SEQ,r.QUOTE_DOUBLE,r.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=o(this.range.start,this.context.root);return e?{start:e,end:o(this.range.end,this.context.root)}:void 0}get rawValue(){if(!this.valueRange||!this.context)return null;const{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,n.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};{const[e,n,r]=t.match(/^(.*!)([^!]*)$/);return{handle:n,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;const{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(e){const{src:t}=this.context;if(t[e]===n.COMMENT){const n=c.endOfLine(t,e+1),r=new a(e,n);return this.props.push(r),n}return e}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){const{context:{src:e},range:t,value:n}=this;if(null!=n)return n;const r=e.slice(t.start,t.end);return c.addStringTerminator(e,t.end,r)}}class u extends Error{constructor(e,t,n){if(!(n&&t instanceof c))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);const t=e&&o(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){const{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;const r=e&&function({start:e,end:t},n,r=80){let s=function(e,t){const{lineStarts:n,src:r}=i(t);if(!n||!(e>=1)||e>n.length)return null;const s=n[e-1];let o=n[e];for(;o&&o>s&&"\n"===r[o-1];)--o;return r.slice(s,o)}(e.line,n);if(!s)return null;let{col:o}=e;if(s.length>r)if(o<=r-10)s=s.substr(0,r-1)+"…";else{const e=Math.round(r/2);s.length>o+e&&(s=s.substr(0,o+e-1)+"…"),o-=s.length-r,s="…"+s.substr(1-r)}let a=1,c="";return t&&(t.line===e.line&&o+(t.col-e.col)<=r+1?a=t.col-e.col:(a=Math.min(s.length+1,r)-o,c="…")),`${s}\n${o>1?" ".repeat(o-1):""}${"^".repeat(a)}${c}`}(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}}class l extends u{constructor(e,t){super("YAMLSemanticError",e,t)}}class f extends c{static endOfLine(e,t,n){let r=e[t],s=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[s+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;s+=1,r=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:n}=this.context;let r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let s="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=c.foldNewline(n,r,-1);s+=e,r=t}else if(" "===e||"\t"===e){const i=r;let o=n[r+1];for(;r<t&&(" "===o||"\t"===o);)r+=1,o=n[r+1];"\n"!==o&&(s+=r>i?n.slice(i,r+1):e)}else s+=e}const i=n[e];switch(i){case"\t":return{errors:[new l(this,"Plain value cannot start with a tab character")],str:s};case"@":case"`":return{errors:[new l(this,`Plain value cannot start with reserved character ${i}`)],str:s};default:return s}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let s=e,i=e;for(let e=r[s];"\n"===e&&!c.atDocumentBoundary(r,s+1);e=r[s]){const e=c.endOfBlockIndent(r,t,s+1);if(null===e||"#"===r[e])break;"\n"===r[e]?s=e:(i=f.endOfLine(r,e,n),s=i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=i,i}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let s=t;const i=r[s];return i&&"#"!==i&&"\n"!==i&&(s=f.endOfLine(r,t,n)),this.valueRange=new a(t,s),s=c.endOfWhiteSpace(r,s),s=this.parseComment(s),this.hasComment&&!this.valueRange.isEmpty()||(s=this.parseBlockValue(s)),s}}t.Char=n,t.Node=c,t.PlainValue=f,t.Range=a,t.Type=r,t.YAMLError=u,t.YAMLReferenceError=class extends u{constructor(e,t){super("YAMLReferenceError",e,t)}},t.YAMLSemanticError=l,t.YAMLSyntaxError=class extends u{constructor(e,t){super("YAMLSyntaxError",e,t)}},t.YAMLWarning=class extends u{constructor(e,t){super("YAMLWarning",e,t)}},t._defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.defaultTagPrefix="tag:yaml.org,2002:",t.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}},359:(e,t,n)=>{"use strict";var r=n(487),s=n(314),i=n(125);const o={createNode:function(e,t,n){const r=new s.YAMLMap(e);if(t instanceof Map)for(const[s,i]of t)r.items.push(e.createPair(s,i,n));else if(t&&"object"==typeof t)for(const s of Object.keys(t))r.items.push(e.createPair(s,t[s],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap},a={createNode:function(e,t,n){const r=new s.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const s of t){const t=e.createNode(s,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq},c={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),s.stringifyString(e,t,n,r)),options:s.strOptions},u=[o,a,c],l=e=>"bigint"==typeof e||Number.isInteger(e),f=(e,t,n)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,n);function h(e,t,n){const{value:r}=e;return l(r)&&r>=0?n+r.toString(t):s.stringifyNumber(e)}const p={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},d={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr},m={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>f(e,t,8),options:s.intOptions,stringify:e=>h(e,8,"0o")},g={identify:l,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>f(e,e,10),options:s.intOptions,stringify:s.stringifyNumber},y={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>f(e,t,16),options:s.intOptions,stringify:e=>h(e,16,"0x")},v={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},b={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},w={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,n){const r=t||n,i=new s.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:s.stringifyNumber},S=u.concat([p,d,m,g,y,v,b,w]),O=e=>"bigint"==typeof e||Number.isInteger(e),E=({value:e})=>JSON.stringify(e),N=[o,a,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:E},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:E},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:E},{identify:O,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>O(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:E}];N.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};const A=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr,T=e=>"bigint"==typeof e||Number.isInteger(e);function L(e,t,n){let r=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`}const t=BigInt(r);return"-"===e?BigInt(-1)*t:t}const i=parseInt(r,n);return"-"===e?-1*i:i}function M(e,t,n){const{value:r}=e;if(T(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return s.stringifyNumber(e)}const x=u.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new s.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:s.boolOptions,stringify:A},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:s.boolOptions,stringify:A},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>L(t,n,2),stringify:e=>M(e,2,"0b")},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>L(t,n,8),stringify:e=>M(e,8,"0")},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>L(t,n,10),stringify:s.stringifyNumber},{identify:T,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>L(t,n,16),stringify:e=>M(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const n=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp),P={core:S,failsafe:u,json:N,yaml11:x},k={binary:i.binary,bool:d,float:w,floatExp:b,floatNaN:v,floatTime:i.floatTime,int:g,intHex:y,intOct:m,intTime:i.intTime,map:o,null:p,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};const I=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:s}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?I:r||null,!e&&s&&i.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let s=e[r.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(const e of n)s=s.concat(e);else"function"==typeof n&&(s=n(s.slice()));for(let e=0;e<s.length;++e){const n=s[e];if("string"==typeof n){const r=t[n];if(!r){const e=Object.keys(t).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${e}`)}s[e]=r}}return s}(P,k,e||s,n)}createNode(e,t,n,r){const i={defaultPrefix:_.defaultPrefix,schema:this,wrapScalars:t};return function(e,t,n){if(e instanceof s.Node)return e;const{defaultPrefix:r,onTagObj:i,prevObjects:c,schema:u,wrapScalars:l}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let f=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))||e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,u.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return l?new s.Scalar(e):e;f=e instanceof Map?o:e[Symbol.iterator]?a:o}i&&(i(f),delete n.onTagObj);const h={value:void 0,node:void 0};if(e&&"object"==typeof e&&c){const t=c.get(e);if(t){const e=new s.Alias(t);return n.aliasNodes.push(e),e}h.value=e,c.set(e,h)}return h.node=f.createNode?f.createNode(n.schema,e,n):l?new s.Scalar(e):e,t&&h.node instanceof s.Node&&(h.node.tag=t),h.node}(e,n,r?Object.assign(r,i):i)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),i=this.createNode(t,n.wrapScalars,null,n);return new s.Pair(r,i)}}r._defineProperty(_,"defaultPrefix",r.defaultTagPrefix),r._defineProperty(_,"defaultTags",r.defaultTags),t.Schema=_},667:(e,t,n)=>{"use strict";var r=n(24),s=n(453),i=n(359),o=n(487),a=n(125);n(314);class c extends s.Document{constructor(e){super(Object.assign({},s.defaultOptions,e))}}function u(e,t){const n=r.parse(e),s=new c(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";s.errors.unshift(new o.YAMLSemanticError(n[1],e))}return s}const l={createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},s.Document.defaults[s.defaultOptions.version],s.defaultOptions);return new i.Schema(r).createNode(e,t,n)},defaultOptions:s.defaultOptions,Document:c,parse:function(e,t){const n=u(e,t);if(n.warnings.forEach((e=>a.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let s;for(const i of r.parse(e)){const e=new c(t);e.parse(i,s),n.push(e),s=e}return n},parseCST:r.parse,parseDocument:u,scalarOptions:s.scalarOptions,stringify:function(e,t){const n=new c(t);return n.contents=e,String(n)}};t.YAML=l},24:(e,t,n)=>{"use strict";var r=n(487);class s extends r.Node{constructor(){super(r.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new r.Range(t,t+1),t+1}}class i extends r.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{atLineStart:o,lineStart:a}=e;o||this.type!==r.Type.SEQ_ITEM||(this.error=new r.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const c=o?t-a:e.indent;let u=r.Node.endOfWhiteSpace(i,t+1),l=i[u];const f="#"===l,h=[];let p=null;for(;"\n"===l||"#"===l;){if("#"===l){const e=r.Node.endOfLine(i,u+1);h.push(new r.Range(u,e)),u=e}else o=!0,a=u+1,"\n"===i[r.Node.endOfWhiteSpace(i,a)]&&0===h.length&&(p=new s,a=p.parse({src:i},a)),u=r.Node.endOfIndent(i,a);l=i[u]}if(r.Node.nextNodeIsIndented(l,u-(a+c),this.type!==r.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:c,lineStart:a,parent:this},u):l&&a>t+1&&(u=a-1),this.node){if(p){const t=e.parent.items||e.parent.contents;t&&t.push(p)}h.length&&Array.prototype.push.apply(this.props,h),u=this.node.range.end}else if(f){const e=h[0];this.props.push(e),u=e.end}else u=r.Node.endOfLine(i,t+1);const d=this.node?this.node.valueRange.end:u;return this.valueRange=new r.Range(t,d),u}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:n,value:s}=this;if(null!=s)return s;const i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return r.Node.addStringTerminator(e,n.end,i)}}class o extends r.Node{constructor(){super(r.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new r.Range(t,n),n}}function a(e){let t=e;for(;t instanceof i;)t=t.node;if(!(t instanceof c))return null;const n=t.items.length;let s=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===r.Type.COMMENT){const{indent:t,lineStart:r}=n.context;if(t>0&&n.range.start>=r+t)break;s=e}else{if(n.type!==r.Type.BLANK_LINE)break;s=e}}if(-1===s)return null;const o=t.items.splice(s,n-s),a=o[0].range.start;for(;t.range.end=a,t.valueRange&&t.valueRange.end>a&&(t.valueRange.end=a),t!==e;)t=t.context.parent;return o}class c extends r.Node{static nextContentHasIndent(e,t,n){const s=r.Node.endOfLine(e,t)+1,i=e[t=r.Node.endOfWhiteSpace(e,s)];return!!i&&(t>=s+n||("#"===i||"\n"===i)&&c.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===r.Type.SEQ_ITEM?r.Type.SEQ:r.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);const n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];const t=a(e);t&&Array.prototype.push.apply(this.items,t)}get includesTrailingLines(){return this.items.length>0}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let u=r.Node.startOfLine(i,t);const l=this.items[0];l.context.parent=this,this.valueRange=r.Range.copy(l.valueRange);const f=l.range.start-l.context.lineStart;let h=t;h=r.Node.normalizeOffset(i,h);let p=i[h],d=r.Node.endOfWhiteSpace(i,u)===h,m=!1;for(;p;){for(;"\n"===p||"#"===p;){if(d&&"\n"===p&&!m){const e=new s;if(h=e.parse({src:i},h),this.valueRange.end=h,h>=i.length){p=null;break}this.items.push(e),h-=1}else if("#"===p){if(h<u+f&&!c.nextContentHasIndent(i,h,f))return h;const e=new o;if(h=e.parse({indent:f,lineStart:u,src:i},h),this.items.push(e),this.valueRange.end=h,h>=i.length){p=null;break}}if(u=h+1,h=r.Node.endOfIndent(i,u),r.Node.atBlank(i,h)){const e=r.Node.endOfWhiteSpace(i,h),t=i[e];t&&"\n"!==t&&"#"!==t||(h=e)}p=i[h],d=!0}if(!p)break;if(h!==u+f&&(d||":"!==p)){if(h<u+f){u>t&&(h=u);break}if(!this.error){const e="All collection items must start at the same column";this.error=new r.YAMLSyntaxError(this,e)}}if(l.type===r.Type.SEQ_ITEM){if("-"!==p){u>t&&(h=u);break}}else if("-"===p&&!this.error){const e=i[h+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new r.YAMLSyntaxError(this,e)}}const e=n({atLineStart:d,inCollection:!0,indent:f,lineStart:u,parent:this},h);if(!e)return h;if(this.items.push(e),this.valueRange.end=e.valueRange.end,h=r.Node.normalizeOffset(i,e.range.end),p=i[h],d=!1,m=e.includesTrailingLines,p){let e=h-1,t=i[e];for(;" "===t||"\t"===t;)t=i[--e];"\n"===t&&(u=e+1,d=!0)}const g=a(e);g&&Array.prototype.push.apply(this.items,g)}return h}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;let i=e.slice(n.start,t[0].range.start)+String(t[0]);for(let e=1;e<t.length;++e){const n=t[e],{atLineStart:r,indent:s}=n.context;if(r)for(let e=0;e<s;++e)i+=" ";i+=String(n)}return r.Node.addStringTerminator(e,n.end,i)}}class u extends r.Node{constructor(){super(r.Type.DIRECTIVE),this.name=null}get parameters(){const e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){const{src:t}=this.context;let n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){const{src:t}=this.context;let n=e,s=t[n];for(;s&&"\n"!==s&&"#"!==s;)s=t[n+=1];return this.valueRange=new r.Range(e,n),n}parse(e,t){this.context=e;let n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new r.Range(t,n),n}}class l extends r.Node{static startCommentOrEndBlankLine(e,t){const n=r.Node.endOfWhiteSpace(e,t),s=e[n];return"#"===s||"\n"===s?n:t}constructor(){super(r.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){const{src:t}=this.context;this.directives=[];let n=!0,i=!1,a=e;for(;!r.Node.atDocumentBoundary(t,a,r.Char.DIRECTIVES_END);)switch(a=l.startCommentOrEndBlankLine(t,a),t[a]){case"\n":if(n){const e=new s;a=e.parse({src:t},a),a<t.length&&this.directives.push(e)}else a+=1,n=!0;break;case"#":{const e=new o;a=e.parse({src:t},a),this.directives.push(e),n=!1}break;case"%":{const e=new u;a=e.parse({parent:this,src:t},a),this.directives.push(e),i=!0,n=!1}break;default:return i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new r.Range(a,a+3),a+3):(i?this.error=new r.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let i=e;for(;"-"===n[i-1];)i-=1;let c=r.Node.endOfWhiteSpace(n,e),u=i===e;for(this.valueRange=new r.Range(c);!r.Node.atDocumentBoundary(n,c,r.Char.DOCUMENT_END);){switch(n[c]){case"\n":if(u){const e=new s;c=e.parse({src:n},c),c<n.length&&this.contents.push(e)}else c+=1,u=!0;i=c;break;case"#":{const e=new o;c=e.parse({src:n},c),this.contents.push(e),u=!1}break;default:{const e=r.Node.endOfIndent(n,c),s=t({atLineStart:u,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},e);if(!s)return this.valueRange.end=e;this.contents.push(s),c=s.range.end,u=!1;const o=a(s);o&&Array.prototype.push.apply(this.contents,o)}}c=l.startCommentOrEndBlankLine(n,c)}if(this.valueRange.end=c,n[c]&&(this.documentEndMarker=new r.Range(c,c+3),c+=3,n[c])){if(c=r.Node.endOfWhiteSpace(n,c),"#"===n[c]){const e=new o;c=e.parse({src:n},c),this.contents.push(e)}switch(n[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new r.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}parse(e,t){e.root=this,this.context=e;const{src:n}=e;let r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){const{contents:e,directives:t,value:n}=this;if(null!=n)return n;let s=t.join("");return e.length>0&&((t.length>0||e[0].type===r.Type.COMMENT)&&(s+="---\n"),s+=e.join("")),"\n"!==s[s.length-1]&&(s+="\n"),s}}class f extends r.Node{parse(e,t){this.context=e;const{src:n}=e;let s=r.Node.endOfIdentifier(n,t+1);return this.valueRange=new r.Range(t+1,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}const h="KEEP",p="STRIP";class d extends r.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping="CLIP",this.header=null}get includesTrailingLines(){return this.chomping===h}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[t-1];for(;"\n"===o||"\t"===o||" "===o;){if(t-=1,t<=e){if(this.chomping===h)break;return""}"\n"===o&&(i=t),o=s[t-1]}let a=t+1;i&&(this.chomping===h?(a=i,t=this.valueRange.end):t=i);const c=n+this.blockIndent,u=this.type===r.Type.BLOCK_FOLDED;let l=!0,f="",d="",m=!1;for(let n=e;n<t;++n){for(let e=0;e<c&&" "===s[n];++e)n+=1;const e=s[n];if("\n"===e)"\n"===d?f+="\n":d="\n";else{const i=r.Node.endOfLine(s,n),o=s.slice(n,i);n=i,u&&(" "===e||"\t"===e)&&n<a?(" "===d?d="\n":m||l||"\n"!==d||(d="\n\n"),f+=d+o,d=i<t&&s[i]||"",m=!0):(f+=d+o,d=u&&n<a?" ":"\n",m=!1),l&&""!==o&&(l=!1)}}return this.chomping===p?f:f+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,s="";for(;;){const i=t[n];switch(i){case"-":this.chomping=p;break;case"+":this.chomping=h;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new r.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,s=!!this.blockIndent;let i=e,o=e,a=1;for(let e=n[i];"\n"===e&&(i+=1,!r.Node.atDocumentBoundary(n,i));e=n[i]){const e=r.Node.endOfBlockIndent(n,t,i);if(null===e)break;const c=n[e],u=e-(i+t);if(this.blockIndent){if(c&&"\n"!==c&&u<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their "+(s?"explicit indentation indicator":"first line");this.error=new r.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(u<a){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new r.YAMLSemanticError(this,e)}this.blockIndent=u}else u>a&&(a=u);i="\n"===n[e]?e:o=r.Node.endOfLine(n,e)}return this.chomping!==h&&(i=n[o]?o+1:o),this.valueRange=new r.Range(e+1,i),i}parse(e,t){this.context=e;const{src:n}=e;let s=this.parseBlockHeader(t);return s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class m extends r.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===r.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:i}=e;let{indent:a,lineStart:c}=e,u=i[t];this.items=[{char:u,offset:t}];let l=r.Node.endOfWhiteSpace(i,t+1);for(u=i[l];u&&"]"!==u&&"}"!==u;){switch(u){case"\n":if(c=l+1,"\n"===i[r.Node.endOfWhiteSpace(i,c)]){const e=new s;c=e.parse({src:i},c),this.items.push(e)}if(l=r.Node.endOfIndent(i,c),l<=c+a&&(u=i[l],l<c+a||"]"!==u&&"}"!==u)){const e="Insufficient indentation in flow collection";this.error=new r.YAMLSemanticError(this,e)}break;case",":this.items.push({char:u,offset:l}),l+=1;break;case"#":{const e=new o;l=e.parse({src:i},l),this.items.push(e)}break;case"?":case":":{const e=i[l+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===u&&this.prevNodeIsJsonLike()){this.items.push({char:u,offset:l}),l+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:c,parent:this},l);if(!e)return this.valueRange=new r.Range(t,l),l;this.items.push(e),l=r.Node.normalizeOffset(i,e.range.end)}}l=r.Node.endOfWhiteSpace(i,l),u=i[l]}return this.valueRange=new r.Range(t,l+1),u&&(this.items.push({char:u,offset:l}),l=r.Node.endOfWhiteSpace(i,l+1),l=this.parseComment(l)),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof r.Node)t=n.setOrigRanges(e,t);else if(0===e.length)n.origOffset=n.offset;else{let r=t;for(;r<e.length&&!(e[r]>n.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}toString(){const{context:{src:e},items:t,range:n,value:s}=this;if(null!=s)return s;const i=t.filter((e=>e instanceof r.Node));let o="",a=n.start;return i.forEach((t=>{const n=e.slice(a,t.range.start);a=t.range.end,o+=n+String(t),"\n"===o[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),r.Node.addStringTerminator(e,n.end,o)}}class g extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;'"'!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="";break;case"b":o+="\b";break;case"e":o+="";break;case"f":o+="\f";break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":case"\t":o+="\t";break;case"v":o+="\v";break;case"N":o+="…";break;case"_":o+=" ";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case"\n":for(;" "===i[a+1]||"\t"===i[a+1];)a+=1;break;default:e.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,n){const{src:s}=this.context,i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new r.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`)),s.substr(e-2,t+2)):String.fromCodePoint(o)}parse(e,t){this.context=e;const{src:n}=e;let s=g.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class y extends r.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[],{start:t,end:n}=this.valueRange,{indent:s,src:i}=this.context;"'"!==i[n-1]&&e.push(new r.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;a<n-1;++a){const t=i[a];if("\n"===t){r.Node.atDocumentBoundary(i,a+1)&&e.push(new r.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:c}=r.Node.foldNewline(i,a,s);o+=t,a=n,c&&e.push(new r.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)o+=t,a+=1,"'"!==i[a]&&e.push(new r.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=a;let n=i[a+1];for(;" "===n||"\t"===n;)a+=1,n=i[a+1];"\n"!==n&&(o+=a>e?i.slice(e,a+1):t)}else o+=t}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:n}=e;let s=y.endOfQuote(n,t+1);return this.valueRange=new r.Range(t,s),s=r.Node.endOfWhiteSpace(n,s),s=this.parseComment(s),s}}class v{static parseType(e,t,n){switch(e[t]){case"*":return r.Type.ALIAS;case">":return r.Type.BLOCK_FOLDED;case"|":return r.Type.BLOCK_LITERAL;case"{":return r.Type.FLOW_MAP;case"[":return r.Type.FLOW_SEQ;case"?":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_KEY:r.Type.PLAIN;case":":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.MAP_VALUE:r.Type.PLAIN;case"-":return!n&&r.Node.atBlank(e,t+1,!0)?r.Type.SEQ_ITEM:r.Type.PLAIN;case'"':return r.Type.QUOTE_DOUBLE;case"'":return r.Type.QUOTE_SINGLE;default:return r.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:s,indent:o,lineStart:a,parent:u}={}){r._defineProperty(this,"parseNode",((e,t)=>{if(r.Node.atDocumentBoundary(this.src,t))return null;const n=new v(this,e),{props:s,type:o,valueStart:a}=n.parseProps(t),u=function(e,t){switch(e){case r.Type.ALIAS:return new f(e,t);case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return new d(e,t);case r.Type.FLOW_MAP:case r.Type.FLOW_SEQ:return new m(e,t);case r.Type.MAP_KEY:case r.Type.MAP_VALUE:case r.Type.SEQ_ITEM:return new i(e,t);case r.Type.COMMENT:case r.Type.PLAIN:return new r.PlainValue(e,t);case r.Type.QUOTE_DOUBLE:return new g(e,t);case r.Type.QUOTE_SINGLE:return new y(e,t);default:return null}}(o,s);let l=u.parse(n,a);if(u.range=new r.Range(t,l),l<=t&&(u.error=new Error("Node#parse consumed no characters"),u.error.parseEnd=l,u.error.source=u,u.range.end=t+1),n.nodeStartsCollection(u)){u.error||n.atLineStart||n.parent.type!==r.Type.DOCUMENT||(u.error=new r.YAMLSyntaxError(u,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new c(u);return l=e.parse(new v(n),l),e.range=new r.Range(t,l),e}return u})),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=s?s:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=a?a:e.lineStart,this.parent=null!=u?u:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:s}=this;if(t||n)return!1;if(e instanceof i)return!0;let o=e.range.end;return"\n"!==s[o]&&"\n"!==s[o-1]&&(o=r.Node.endOfWhiteSpace(s,o),":"===s[o])}parseProps(e){const{inFlow:t,parent:n,src:s}=this,i=[];let o=!1,a=s[e=this.atLineStart?r.Node.endOfIndent(s,e):r.Node.endOfWhiteSpace(s,e)];for(;a===r.Char.ANCHOR||a===r.Char.COMMENT||a===r.Char.TAG||"\n"===a;){if("\n"===a){let t,i=e;do{t=i+1,i=r.Node.endOfIndent(s,t)}while("\n"===s[i]);const a=i-(t+this.indent),c=n.type===r.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==s[i]&&!r.Node.nextNodeIsIndented(s[i],a,!c))break;this.atLineStart=!0,this.lineStart=t,o=!1,e=i}else if(a===r.Char.COMMENT){const t=r.Node.endOfLine(s,e+1);i.push(new r.Range(e,t)),e=t}else{let t=r.Node.endOfIdentifier(s,e+1);a===r.Char.TAG&&","===s[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))&&(t=r.Node.endOfIdentifier(s,t+5)),i.push(new r.Range(e,t)),o=!0,e=r.Node.endOfWhiteSpace(s,t)}a=s[e]}return o&&":"===a&&r.Node.atBlank(s,e+1,!0)&&(e-=1),{props:i,type:v.parseType(s,e,t),valueStart:e}}}t.parse=function(e){const t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,((e,n)=>(e.length>1&&t.push(n),"\n"))));const n=[];let r=0;do{const t=new l,s=new v({src:e});r=t.parse(s,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(0===t.length)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join("...\n"),n}},314:(e,t,n)=>{"use strict";var r=n(487);function s(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}class i{}function o(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>o(e,String(t),n)));if(e&&"function"==typeof e.toJSON){const r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});const s=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(s),s}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class a extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:o(this.value,e,t)}toString(){return String(this.value)}}function c(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(Number.isInteger(n)&&n>=0){const e=[];e[n]=r,r=e}else{const e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}const u=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class l extends i{constructor(e){super(),r._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(u(e))this.add(t);else{const[n,...r]=e,s=this.get(n,!0);if(s instanceof l)s.addIn(r,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,c(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof l)return n.deleteIn(t);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],n){const r=this.get(e,!0);return 0===t.length?!n&&r instanceof a?r.value:r:r instanceof l?r.getIn(t,n):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof a&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([e,...t]){if(0===t.length)return this.has(e);const n=this.get(e,!0);return n instanceof l&&n.hasIn(t)}setIn([e,...t],n){if(0===t.length)this.set(e,n);else{const r=this.get(e,!0);if(r instanceof l)r.setIn(t,n);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`);this.set(e,c(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:i,itemIndent:o},a,c){const{indent:u,indentStep:f,stringify:h}=e,p=this.type===r.Type.FLOW_MAP||this.type===r.Type.FLOW_SEQ||e.inFlow;p&&(o+=f);const d=i&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:o,inFlow:p,type:null});let m=!1,g=!1;const y=this.items.reduce(((t,n,r)=>{let i;n&&(!m&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:`#${e}`})})),n.comment&&(i=n.comment),p&&(!m&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(g=!0)),m=!1;let a=h(n,e,(()=>i=null),(()=>m=!0));return p&&!g&&a.includes("\n")&&(g=!0),p&&r<this.items.length-1&&(a+=","),a=s(a,o,i),m&&(i||p)&&(m=!1),t.push({type:"item",str:a}),t}),[]);let v;if(0===y.length)v=n.start+n.end;else if(p){const{start:e,end:t}=n,r=y.map((e=>e.str));if(g||r.reduce(((e,t)=>e+t.length+2),2)>l.maxFlowStringSingleLineLength){v=e;for(const e of r)v+=e?`\n${f}${u}${e}`:"\n";v+=`\n${u}${t}`}else v=`${e} ${r.join(" ")} ${t}`}else{const e=y.map(t);v=e.shift();for(const t of e)v+=t?`\n${u}${t}`:"\n"}return this.comment?(v+="\n"+this.comment.replace(/^/gm,`${u}#`),a&&a()):m&&c&&c(),v}}function f(e){let t=e instanceof a?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}r._defineProperty(l,"maxFlowStringSingleLineLength",60);class h extends l{add(e){this.items.push(e)}delete(e){const t=f(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=f(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof a?r.value:r}has(e){const t=f(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=f(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);this.items[n]=t}toJSON(e,t){const n=[];t&&t.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}class p extends i{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=p.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new a(null)),!(this.key instanceof i))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}addToJSMap(e,t){const n=o(this.key,"",e);if(t instanceof Map){const r=o(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{const r=((e,t,n)=>null===t?"":"object"!=typeof t?String(t):e instanceof i&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e),s=o(this.value,r,e);r in t?Object.defineProperty(t,r,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[r]=s}return t}toJSON(e,t){const n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,t,n){if(!e||!e.doc)return JSON.stringify(this);const{indent:o,indentSeq:c,simpleKeys:u}=e.doc.options;let{key:f,value:p}=this,d=f instanceof i&&f.comment;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(f instanceof l)throw new Error("With simple keys, collection cannot be used as a key value")}let m=!u&&(!f||d||(f instanceof i?f instanceof l||f.type===r.Type.BLOCK_FOLDED||f.type===r.Type.BLOCK_LITERAL:"object"==typeof f));const{doc:g,indent:y,indentStep:v,stringify:b}=e;e=Object.assign({},e,{implicitKey:!m,indent:y+v});let w=!1,S=b(f,e,(()=>d=null),(()=>w=!0));if(S=s(S,e.indent,d),!m&&S.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(e.allNullValues&&!u)return this.comment?(S=s(S,e.indent,this.comment),t&&t()):w&&!d&&n&&n(),e.inFlow&&!m?S:`? ${S}`;S=m?`? ${S}\n${y}:`:`${S}:`,this.comment&&(S=s(S,e.indent,this.comment),t&&t());let O="",E=null;p instanceof i?(p.spaceBefore&&(O="\n"),p.commentBefore&&(O+=`\n${p.commentBefore.replace(/^/gm,`${e.indent}#`)}`),E=p.comment):p&&"object"==typeof p&&(p=g.schema.createNode(p,!0)),e.implicitKey=!1,!m&&!this.comment&&p instanceof a&&(e.indentAtStart=S.length+1),w=!1,!c&&o>=2&&!e.inFlow&&!m&&p instanceof h&&p.type!==r.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));const N=b(p,e,(()=>E=null),(()=>w=!0));let A=" ";return O||this.comment?A=`${O}\n${e.indent}`:!m&&p instanceof l?("["===N[0]||"{"===N[0])&&!N.includes("\n")||(A=`\n${e.indent}`):"\n"===N[0]&&(A=""),w&&!E&&n&&n(),s(S+A+N,e.indent,E)}}r._defineProperty(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const d=(e,t)=>{if(e instanceof m){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof l){let n=0;for(const r of e.items){const e=d(r,t);e>n&&(n=e)}return n}if(e instanceof p){const n=d(e.key,t),r=d(e.value,t);return Math.max(n,r)}return 1};class m extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:s,inStringifyKey:i}){let o=Object.keys(n).find((e=>n[e]===t));if(!o&&i&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${s?" ":""}`;const a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=r.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return o(this.source,e,t);const{anchors:n,maxAliasCount:s}=t,i=n.get(this.source);if(!i||void 0===i.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(s>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=d(this.source,n)),i.count*i.aliasCount>s)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new r.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return i.res}toString(e){return m.stringify(this,e)}}function g(e,t){const n=t instanceof a?t.value:t;for(const r of e)if(r instanceof p){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}r._defineProperty(m,"default",!0);class y extends l{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);const n=g(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error(`Key ${e.key} already set`);n.value=e.value}else if(r){const t=this.items.findIndex((t=>r(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){const t=g(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=g(this.items,e),r=n&&n.value;return!t&&r instanceof a?r.value:r}has(e){return!!g(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){const r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(const e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!(e instanceof p))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}class v extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof h||(t=new h,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new a("<<"),new h);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof y))throw new Error("Merge sources must be maps");const r=n.toJSON(null,e,Map);for(const[e,n]of r)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){const n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];const r=super.toString(e,t);return this.value=n,r}}const b={defaultType:r.Type.BLOCK_LITERAL,lineWidth:76},w={defaultType:r.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function S(e,t,n){for(const{format:n,test:r,resolve:s}of t)if(r){const t=e.match(r);if(t){let e=s.apply(null,t);return e instanceof a||(e=new a(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new a(e)}const O="flow",E="block",N="quoted",A=(e,t)=>{let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function T(e,t,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let f,h,p=s-t.length;"number"==typeof r&&(r>s-Math.max(2,i)?u.push(0):p=s-r);let d=!1,m=-1,g=-1,y=-1;n===E&&(m=A(e,m),-1!==m&&(p=m+c));for(let t;t=e[m+=1];){if(n===N&&"\\"===t){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===t)n===E&&(m=A(e,m)),p=m+c,f=void 0;else{if(" "===t&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=m)}if(m>=p)if(f)u.push(f),p=f+c,f=void 0;else if(n===N){for(;" "===h||"\t"===h;)h=t,t=e[m+=1],d=!0;const n=m>y+1?m-2:g-1;if(l[n])return e;u.push(n),l[n]=!0,p=n+c,f=void 0}else d=!0}h=t}if(d&&a&&a(),0===u.length)return e;o&&o();let v=e.slice(0,u[0]);for(let r=0;r<u.length;++r){const s=u[r],i=u[r+1]||e.length;0===s?v=`\n${t}${e.slice(0,i)}`:(n===N&&l[s]&&(v+=`${e[s]}\\`),v+=`\n${t}${e.slice(s+1,i)}`)}return v}const L=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},w.fold):w.fold,M=e=>/^(%|---|\.\.\.)/m.test(e);function x(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:s}=w.doubleQuoted,i=JSON.stringify(e);if(r)return i;const o=t.indent||(M(e)?" ":"");let a="",c=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(a+=i.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{a+=i.slice(c,e);const t=i.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=i.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<s)e+=1;else{for(a+=i.slice(c,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)a+="\n",e+=2;a+=o," "===i[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+i.slice(c):i,n?a:T(a,o,N,L(t))}function P(e,t){if(t.implicitKey){if(/\n/.test(e))return x(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return x(e,t);const n=t.indent||(M(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:T(r,n,O,L(t))}function k({comment:e,type:t,value:n},s,i,o){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return x(n,s);const a=s.indent||(s.forceBlockIndent||M(n)?" ":""),c=a?"2":"1",u=t!==r.Type.BLOCK_FOLDED&&(t===r.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,w.fold.lineWidth,a.length));let l=u?"|":">";if(!n)return l+"\n";let f="",h="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":n!==e&&t===e.length-1||(l+="+",o&&o()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=c);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(l+=" #"+e.replace(/ ?[\r\n]+/g," "),i&&i()),!n)return`${l}${c}\n${a}${h}`;if(u)return n=n.replace(/\n+/g,`$&${a}`),`${l}\n${a}${f}${n}${h}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const p=T(`${f}${n}${h}`,a,E,w.fold);return`${l}\n${a}${p}`}function I(e,t){let n,s,i;switch(t.type){case r.Type.FLOW_MAP:n="}",s="flow map";break;case r.Type.FLOW_SEQ:n="]",s="flow sequence";break;default:return void e.push(new r.YAMLSemanticError(t,"Not a flow collection!?"))}for(let e=t.items.length-1;e>=0;--e){const n=t.items[e];if(!n||n.type!==r.Type.COMMENT){i=n;break}}if(i&&i.char!==n){const o=`Expected ${s} to end with ${n}`;let a;"number"==typeof i.offset?(a=new r.YAMLSemanticError(t,o),a.offset=i.offset+1):(a=new r.YAMLSemanticError(i,o),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function _(e,t){const n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}}function C(e,t){const n=String(t),s=n.substr(0,8)+"..."+n.substr(-8);return new r.YAMLSemanticError(e,`The "${s}" key is too long`)}function $(e,t){for(const{afterKey:n,before:r,comment:s}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===s?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+s:t.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}function R(e,t){const n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((n=>{n.source||(n.source=t),e.errors.push(n)})),n.str):""}function B(e,t,n){const{tags:r}=e.schema,s=[];for(const i of r)if(i.tag===n){if(!i.test){const n=i.resolve(e,t);return n instanceof l?n:new a(n)}s.push(i)}const i=R(e,t);return"string"==typeof i&&s.length>0?S(i,s,r.scalarFallback):null}const j=e=>{if(!e)return!1;const{type:t}=e;return t===r.Type.MAP_KEY||t===r.Type.MAP_VALUE||t===r.Type.SEQ_ITEM};function Y(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:s,hasTag:i}=function(e,t){const n={before:[],after:[]};let s=!1,i=!1;const o=j(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:c}of o)switch(t.context.src[a]){case r.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const n="Comments must be separated from other tokens by white space characters";e.push(new r.YAMLSemanticError(t,n))}const{header:s,valueRange:i}=t;(i&&(a>i.start||s&&a>s.start)?n.after:n.before).push(t.context.src.slice(a+1,c));break}case r.Char.ANCHOR:if(s){const n="A node can have at most one anchor";e.push(new r.YAMLSemanticError(t,n))}s=!0;break;case r.Char.TAG:if(i){const n="A node can have at most one tag";e.push(new r.YAMLSemanticError(t,n))}i=!0}return{comments:n,hasAnchor:s,hasTag:i}}(e.errors,t);if(s){const{anchors:n}=e,r=t.anchor,s=n.getNode(r);s&&(n.map[n.newName(r)]=s),n.map[r]=t}if(t.type===r.Type.ALIAS&&(s||i)){const n="An alias node must not specify any properties";e.errors.push(new r.YAMLSemanticError(t,n))}const o=function(e,t){const{anchors:n,errors:s,schema:i}=e;if(t.type===r.Type.ALIAS){const e=t.rawValue,i=n.getNode(e);if(!i){const n=`Aliased anchor not found: ${e}`;return s.push(new r.YAMLReferenceError(t,n)),null}const o=new m(i);return n._cstAliases.push(o),o}const o=function(e,t){const{tag:n,type:s}=t;let i=!1;if(n){const{handle:s,suffix:o,verbatim:a}=n;if(a){if("!"!==a&&"!!"!==a)return a;const n=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new r.YAMLSemanticError(t,n))}else if("!"!==s||o)try{return function(e,t){const{handle:n,suffix:s}=t.tag;let i=e.tagPrefixes.find((e=>e.handle===n));if(!i){const s=e.getDefaults().tagPrefixes;if(s&&(i=s.find((e=>e.handle===n))),!i)throw new r.YAMLSemanticError(t,`The ${n} tag handle is non-default and was not declared.`)}if(!s)throw new r.YAMLSemanticError(t,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===s[0])return e.warnings.push(new r.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),s;if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(s){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:case r.Type.QUOTE_DOUBLE:case r.Type.QUOTE_SINGLE:return r.defaultTags.STR;case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;case r.Type.PLAIN:return i?r.defaultTags.STR:null;default:return null}}(e,t);if(o)return function(e,t,n){try{const r=B(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{const s=function({type:e}){switch(e){case r.Type.FLOW_MAP:case r.Type.MAP:return r.defaultTags.MAP;case r.Type.FLOW_SEQ:case r.Type.SEQ:return r.defaultTags.SEQ;default:return r.defaultTags.STR}}(t);if(!s)throw new Error(`The tag ${n} is unavailable`);const i=`The tag ${n} is unavailable, falling back to ${s}`;e.warnings.push(new r.YAMLWarning(t,i));const o=B(e,t,s);return o.tag=n,o}catch(n){const s=new r.YAMLReferenceError(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}(e,t,o);if(t.type!==r.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;return s.push(new r.YAMLSyntaxError(t,e)),null}try{return S(R(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),s.push(e),null}}(e,t);if(o){o.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(o.cstNode=t),e.options.keepNodeTypes&&(o.type=t.type);const r=n.before.join("\n");r&&(o.commentBefore=o.commentBefore?`${o.commentBefore}\n${r}`:r);const s=n.after.join("\n");s&&(o.comment=o.comment?`${o.comment}\n${s}`:s)}return t.resolved=o}const D=({context:{lineStart:e,node:t,src:n},props:s})=>{if(0===s.length)return!1;const{start:i}=s[0];if(t&&i>t.valueRange.start)return!1;if(n[i]!==r.Char.COMMENT)return!1;for(let t=e;t<i;++t)if("\n"===n[t])return!1;return!0};function F(e,t){if(!D(e))return;const n=e.getPropValue(0,r.Char.COMMENT,!0);let s=!1;const i=t.value.commentBefore;if(i&&i.startsWith(n))t.value.commentBefore=i.substr(n.length+1),s=!0;else{const r=t.value.comment;!e.node&&r&&r.startsWith(n)&&(t.value.comment=r.substr(n.length+1),s=!0)}s&&(t.comment=n)}t.Alias=m,t.Collection=l,t.Merge=v,t.Node=i,t.Pair=p,t.Scalar=a,t.YAMLMap=y,t.YAMLSeq=h,t.addComment=s,t.binaryOptions=b,t.boolOptions={trueStr:"true",falseStr:"false"},t.findPair=g,t.intOptions={asBigInt:!1},t.isEmptyPath=u,t.nullOptions={nullStr:"null"},t.resolveMap=function(e,t){if(t.type!==r.Type.MAP&&t.type!==r.Type.FLOW_MAP){const n=`A ${t.type} node cannot be resolved as a mapping`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_MAP?function(e,t){const n=[],s=[];let i,o=!1,a="{";for(let c=0;c<t.items.length;++c){const u=t.items[c];if("string"==typeof u.char){const{char:n,offset:l}=u;if("?"===n&&void 0===i&&!o){o=!0,a=":";continue}if(":"===n){if(void 0===i&&(i=null),":"===a){a=",";continue}}else if(o&&(void 0===i&&","!==n&&(i=null),o=!1),void 0!==i&&(s.push(new p(i)),i=void 0,","===n)){a=":";continue}if("}"===n){if(c===t.items.length-1)continue}else if(n===a){a=":";continue}const f=`Flow map contains an unexpected ${n}`,h=new r.YAMLSyntaxError(t,f);h.offset=l,e.errors.push(h)}else u.type===r.Type.BLANK_LINE?n.push({afterKey:!!i,before:s.length}):u.type===r.Type.COMMENT?(_(e.errors,u),n.push({afterKey:!!i,before:s.length,comment:u.comment})):void 0===i?(","===a&&e.errors.push(new r.YAMLSemanticError(u,"Separator , missing in flow map")),i=Y(e,u)):(","!==a&&e.errors.push(new r.YAMLSemanticError(u,"Indicator : missing in flow map entry")),s.push(new p(i,Y(e,u))),i=void 0,o=!1)}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];let i,o=null;for(let a=0;a<t.items.length;++a){const c=t.items[a];switch(c.type){case r.Type.BLANK_LINE:n.push({afterKey:!!i,before:s.length});break;case r.Type.COMMENT:n.push({afterKey:!!i,before:s.length,comment:c.comment});break;case r.Type.MAP_KEY:void 0!==i&&s.push(new p(i)),c.error&&e.errors.push(c.error),i=Y(e,c.node),o=null;break;case r.Type.MAP_VALUE:{if(void 0===i&&(i=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===r.Type.MAP&&!c.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new r.YAMLSemanticError(c.node,t))}let n=c.node;if(!n&&c.props.length>0){n=new r.PlainValue(r.Type.PLAIN,[]),n.context={parent:c,src:c.context.src};const e=c.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof c.range.origStart){const e=c.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const a=new p(i,Y(e,n));F(c,a),s.push(a),i&&"number"==typeof o&&c.range.start>o+1024&&e.errors.push(C(t,i)),i=void 0,o=null}break;default:void 0!==i&&s.push(new p(i)),i=Y(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let n=a+1;;++n){const s=t.items[n];switch(s&&s.type){case r.Type.BLANK_LINE:case r.Type.COMMENT:continue e;case r.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new r.YAMLSemanticError(c,t));break e}}}if(c.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new r.YAMLSemanticError(c,t))}}}return void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t),i=new y;i.items=s,$(i,n);let o=!1;for(let n=0;n<s.length;++n){const{key:i}=s[n];if(i instanceof l&&(o=!0),e.schema.merge&&i&&"<<"===i.value){s[n]=new v(s[n]);const i=s[n].value.items;let o=null;i.some((e=>{if(e instanceof m){const{type:t}=e.source;return t!==r.Type.MAP&&t!==r.Type.FLOW_MAP&&(o="Merge nodes aliases can only point to maps")}return o="Merge nodes can only have Alias nodes as values"})),o&&e.errors.push(new r.YAMLSemanticError(t,o))}else for(let o=n+1;o<s.length;++o){const{key:n}=s[o];if(i===n||i&&n&&Object.prototype.hasOwnProperty.call(i,"value")&&i.value===n.value){const n=`Map keys must be unique; "${i}" is repeated`;e.errors.push(new r.YAMLSemanticError(t,n));break}}}if(o&&!e.options.mapAsMap){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveNode=Y,t.resolveSeq=function(e,t){if(t.type!==r.Type.SEQ&&t.type!==r.Type.FLOW_SEQ){const n=`A ${t.type} node cannot be resolved as a sequence`;return e.errors.push(new r.YAMLSyntaxError(t,n)),null}const{comments:n,items:s}=t.type===r.Type.FLOW_SEQ?function(e,t){const n=[],s=[];let i,o=!1,a=null,c="[",u=null;for(let l=0;l<t.items.length;++l){const f=t.items[l];if("string"==typeof f.char){const{char:n,offset:h}=f;if(":"===n||!o&&void 0===i||(o&&void 0===i&&(i=c?s.pop():null),s.push(new p(i)),o=!1,i=void 0,a=null),n===c)c=null;else if(c||"?"!==n){if("["!==c&&":"===n&&void 0===i){if(","===c){if(i=s.pop(),i instanceof p){const n="Chaining flow sequence pairs is invalid",s=new r.YAMLSemanticError(t,n);s.offset=h,e.errors.push(s)}if(!o&&"number"==typeof a){const n=f.range?f.range.start:f.offset;n>a+1024&&e.errors.push(C(t,i));const{src:s}=u.context;for(let t=a;t<n;++t)if("\n"===s[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new r.YAMLSemanticError(u,t));break}}}else i=null;a=null,o=!1,c=null}else if("["===c||"]"!==n||l<t.items.length-1){const s=`Flow sequence contains an unexpected ${n}`,i=new r.YAMLSyntaxError(t,s);i.offset=h,e.errors.push(i)}}else o=!0}else if(f.type===r.Type.BLANK_LINE)n.push({before:s.length});else if(f.type===r.Type.COMMENT)_(e.errors,f),n.push({comment:f.comment,before:s.length});else{if(c){const t=`Expected a ${c} in flow sequence`;e.errors.push(new r.YAMLSemanticError(f,t))}const t=Y(e,f);void 0===i?(s.push(t),u=f):(s.push(new p(i,t)),i=void 0),a=f.range.start,c=","}}return I(e.errors,t),void 0!==i&&s.push(new p(i)),{comments:n,items:s}}(e,t):function(e,t){const n=[],s=[];for(let i=0;i<t.items.length;++i){const o=t.items[i];switch(o.type){case r.Type.BLANK_LINE:n.push({before:s.length});break;case r.Type.COMMENT:n.push({comment:o.comment,before:s.length});break;case r.Type.SEQ_ITEM:if(o.error&&e.errors.push(o.error),s.push(Y(e,o.node)),o.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new r.YAMLSemanticError(o,t))}break;default:o.error&&e.errors.push(o.error),e.errors.push(new r.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:n,items:s}}(e,t),i=new h;if(i.items=s,$(i,n),!e.options.mapAsMap&&s.some((e=>e instanceof p&&e.key instanceof l))){const n="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new r.YAMLWarning(t,n))}return t.resolved=i,i},t.resolveString=R,t.strOptions=w,t.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let n=t-(s.length-e-1);for(;n-- >0;)s+="0"}return s},t.stringifyString=function(e,t,n,s){const{defaultType:i}=w,{implicitKey:o,inFlow:a}=t;let{type:c,value:u}=e;"string"!=typeof u&&(u=String(u),e=Object.assign({},e,{value:u}));const l=i=>{switch(i){case r.Type.BLOCK_FOLDED:case r.Type.BLOCK_LITERAL:return k(e,t,n,s);case r.Type.QUOTE_DOUBLE:return x(u,t);case r.Type.QUOTE_SINGLE:return P(u,t);case r.Type.PLAIN:return function(e,t,n,s){const{comment:i,type:o,value:a}=e,{actualString:c,implicitKey:u,indent:l,inFlow:f}=t;if(u&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return x(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?P(a,t):x(a,t):k(e,t,n,s);if(!u&&!f&&o!==r.Type.PLAIN&&-1!==a.indexOf("\n"))return k(e,t,n,s);if(""===l&&M(a))return t.forceBlockIndent=!0,k(e,t,n,s);const h=a.replace(/\n+/g,`$&\n${l}`);if(c){const{tags:e}=t.doc.schema;if("string"!=typeof S(h,e,e.scalarFallback).value)return x(a,t)}const p=u?h:T(h,l,O,L(t));return!i||f||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(p,l,i))}(e,t,n,s);default:return null}};c!==r.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(u)?c=r.Type.QUOTE_DOUBLE:!o&&!a||c!==r.Type.BLOCK_FOLDED&&c!==r.Type.BLOCK_LITERAL||(c=r.Type.QUOTE_DOUBLE);let f=l(c);if(null===f&&(f=l(i),null===f))throw new Error(`Unsupported default string type ${i}`);return f},t.toJSON=o},125:(e,t,n)=>{"use strict";var r=n(487),s=n(314);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=s.resolveString(e,t);if("function"==typeof Buffer)return Buffer.from(n,"base64");if("function"==typeof atob){const e=atob(n.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}{const n="This environment does not support reading binary tags; either Buffer or atob is required";return e.errors.push(new r.YAMLReferenceError(t,n)),null}},options:s.binaryOptions,stringify:({comment:e,type:t,value:n},i,o,a)=>{let c;if("function"==typeof Buffer)c=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);c=btoa(e)}}if(t||(t=s.binaryOptions.defaultType),t===r.Type.QUOTE_DOUBLE)n=c;else{const{lineWidth:e}=s.binaryOptions,i=Math.ceil(c.length/e),o=new Array(i);for(let t=0,n=0;t<i;++t,n+=e)o[t]=c.substr(n,e);n=o.join(t===r.Type.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:n},i,o,a)}};function o(e,t){const n=s.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let i=n.items[e];if(!(i instanceof s.Pair)){if(i instanceof s.YAMLMap){if(i.items.length>1){const e="Each pair must have its own sequence indicator";throw new r.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;i.commentBefore&&(e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore),i.comment&&(e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment),i=e}n.items[e]=i instanceof s.Pair?i:new s.Pair(i)}}return n}function a(e,t,n){const r=new s.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(2!==s.length)throw new TypeError(`Expected [key, value] tuple: ${s}`);t=s[0],i=s[1]}else if(s&&s instanceof Object){const e=Object.keys(s);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${s}`);t=e[0],i=s[t]}else t=s;const o=e.createPair(t,i,n);r.items.push(o)}return r}const c={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:a};class u extends s.YAMLSeq{constructor(){super(),r._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this)),r._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this)),r._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this)),r._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this)),r._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this)),this.tag=u.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,i;if(e instanceof s.Pair?(r=s.toJSON(e.key,"",t),i=s.toJSON(e.value,r,t)):r=s.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}}r._defineProperty(u,"tag","tag:yaml.org,2002:omap");const l={identify:e=>e instanceof Map,nodeClass:u,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=o(e,t),i=[];for(const{key:e}of n.items)if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new r.YAMLSemanticError(t,e)}i.push(e.value)}return Object.assign(new u,n)},createNode:function(e,t,n){const r=a(e,t,n),s=new u;return s.items=r.items,s}};class f extends s.YAMLMap{constructor(){super(),this.tag=f.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);s.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=s.findPair(this.items,e);return!t&&n instanceof s.Pair?n.key instanceof s.Scalar?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=s.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new s.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw new Error("Set items must all have null values")}}r._defineProperty(f,"tag","tag:yaml.org,2002:set");const h={identify:e=>e instanceof Set,nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=s.resolveMap(e,t);if(!n.hasAllNullValues())throw new r.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new f,n)},createNode:function(e,t,n){const r=new f;for(const s of t)r.items.push(e.createPair(s,null,n));return r}},p=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},d=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));const n=[e%60];return e<60?n.unshift(0):(e=Math.round((e-n[0])/60),n.unshift(e%60),e>=60&&(e=Math.round((e-n[0])/60),n.unshift(e))),t+n.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},m={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,n)=>p(t,n.replace(/_/g,"")),stringify:d},y={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(e,t,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let u=Date.UTC(t,n-1,r,s||0,i||0,o||0,a||0);if(c&&"Z"!==c){let e=p(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function v(e){const t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function b(e,t){if(v(!1)){const n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?`${t}: ${e}`:e)}}const w={};t.binary=i,t.floatTime=g,t.intTime=m,t.omap=l,t.pairs=c,t.set=h,t.timestamp=y,t.warn=b,t.warnFileDeprecation=function(e){v(!0)&&b(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")},t.warnOptionDeprecation=function(e,t){if(!w[e]&&v(!0)){w[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",b(n,"DeprecationWarning")}}},78:(e,t,n)=>{e.exports=n(667).YAML}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FtpClient:()=>F,FtpClientPool:()=>W,JsonStorage:()=>S,PuboFileSystem:()=>z,RosTopic:()=>Ce,RosTopicManager:()=>$e,SIGKILL:()=>ue,createRpcClient:()=>G,getNetworks:()=>Se,getProcessByPpid:()=>me,getProcessCommandByPid:()=>de,getProcessCpuUseByPid:()=>pe,getProcessName:()=>he,getProcessTree:()=>ge,getWifiName:()=>we,isPortAvailable:()=>ve,isProcessDied:()=>fe,pitch:()=>be});const e=require("fs");function t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function s(){}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?s:String(s)),r)}var s}var o=function(){function e(){this.cache=[],this.running=!1,this.len=0}var n,r,o=e.prototype;return o._run=function(e){var n,r,s=e.fn,i=e.promise;try{return t((n=function(e,t){try{var n=function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(s,(function(e){i.resolve(e)}))}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,(function(e){i.reject(e)})),r=function(){s=null,i=null},n&&n.then?n.then(r):r()))}catch(e){return Promise.reject(e)}},o.run=function(){try{var e=this;if(e.cache.length<1)return e.running=!1,t();e.running=!0;var n=e.cache.shift();return e.len-=1,t((r=function(){e.run()},(i=function(){if("function"==typeof n.fn)return(t=e._run(n))&&t.then?t.then(s):Promise.resolve();var t}())&&i.then?i.then(r):r()))}catch(e){return Promise.reject(e)}var r,i},o.push=function(e){var t=this;return this.len+=1,new Promise((function(n,r){t.cache.push({fn:e,promise:{resolve:n,reject:r}}),t.running||t.run()}))},n=e,(r=[{key:"length",get:function(){return this.len}}])&&i(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();const a=require("crypto");var c=n.n(a);const u={randomUUID:c().randomUUID},l=new Uint8Array(256);let f=l.length;function h(){return f>l.length-16&&(c().randomFillSync(l),f=0),l.slice(f,f+=16)}const p=[];for(let e=0;e<256;++e)p.push((e+256).toString(16).slice(1));const d=function(e,t,n){if(u.randomUUID&&!t&&!e)return u.randomUUID();const r=(e=e||{}).random||(e.rng||h)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]}(r)};function m(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var g=n(1);function y(){}var v=function(){function t(e,t){var n=this;this.path=void 0,this._state={},this.queue=new o,this.key=void 0,this.defaultState=void 0,this.path=e,this.defaultState=t,this.key=encodeURIComponent(e),g.on("online",(function(e){e.on("message",(function(t){return n.onMessage(t,e)}))})),this.restore()}var n=t.prototype;return n.onMessage=function(e,t){try{var n,r=this;return e.key!==r.key?m():m((s=function(){t.send({uid:e.uid,key:r.key,payload:n})},(i="get"===e.type?m(r.getState(),(function(e){n=e})):function(e){var t=e();if(t&&t.then)return t.then(y)}((function(){if("set"===e.type)return m(r.setState(e.payload),(function(e){n=e}))})))&&i.then?i.then(s):s()))}catch(e){return Promise.reject(e)}var s,i},n.sync=function(){try{var e=this;return e.queue.length>0?m():m(w(e.queue.push(e._syncFile.bind(e))))}catch(e){return Promise.reject(e)}},n._syncFile=function(){try{var t=this;return m(new Promise((function(n,r){(0,e.writeFile)(t.path,JSON.stringify(t._state),(function(e){e?r(e):n("")}))})))}catch(e){return Promise.reject(e)}},n.restore=function(){try{var t=(0,e.readFileSync)(this.path);this._state=JSON.parse(t.toString())}catch(t){var n,r="win32"===process.platform?"\\":"/";r&&(0,e.mkdirSync)(this.path.split(r).slice(0,-1).join(r),{recursive:!0}),this.setState(null!=(n=this.defaultState)?n:{})}},n.getState=function(){try{return m(this._state)}catch(e){return Promise.reject(e)}},n.setState=function(e){try{return this._state=e,m(w(this.sync()))}catch(e){return Promise.reject(e)}},t}(),b=function(){function e(e){this.key=void 0,this.callback={},this.key=encodeURIComponent(e),process.on("message",this.onMessage.bind(this))}var t=e.prototype;return t.onMessage=function(e){e.key===this.key&&"function"==typeof this.callback[e.uid]&&(this.callback[e.uid](e.payload),delete this.callback[e.uid])},t.call=function(e){var t=e.type,n=e.payload;try{var r=this;return m(new Promise((function(e){var s=d();r.callback[s]=function(t){return e(t)},process.send({uid:s,type:t,payload:n,key:r.key})})))}catch(e){return Promise.reject(e)}},t.getState=function(){try{return m(this.call({type:"get",payload:{}}))}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return m(this.call({type:"set",payload:e}))}catch(e){return Promise.reject(e)}},e}();function w(e,t){if(!t)return e&&e.then?e.then(y):Promise.resolve()}var S=function(){function e(e,t){var n;void 0===t&&(t={}),this.instance=void 0,g.isPrimary?this.instance=new v(e,t.defaultState):this.instance=new b(e),null!=(n=t)&&n.initialState&&this.merge(t.initialState)}var t=e.prototype;return t.getState=function(){try{return m(this.instance.getState())}catch(e){return Promise.reject(e)}},t.setState=function(e){try{return m(this.instance.setState(e))}catch(e){return Promise.reject(e)}},t.get=function(e){try{return e?m(this.getState(),(function(t){return t[e]})):m(this.getState())}catch(e){return Promise.reject(e)}},t.set=function(e,t){try{var n=this;return m(n.getState(),(function(r){return r[e]=t,w(n.setState(r))}))}catch(e){return Promise.reject(e)}},t.merge=function(e){try{var t=this;return m(t.getState(),(function(n){for(var r=0,s=Object.keys(e);r<s.length;r++){var i=s[r];n[i]=e[i]}return w(t.setState(n))}))}catch(e){return Promise.reject(e)}},t.remove=function(e){try{var t=this;return m(t.getState(),(function(n){return delete n[e],w(t.setState(n))}))}catch(e){return Promise.reject(e)}},e}(),O=function(e){void 0===e&&(e=8);var t=function(e){return Math.random().toString(32).slice(2,2+e)};if(e<=8)return t(e);for(var n="",r=0;r<=e;r+=8)n+=t(e-r>8?8:e-r);return n};function E(){}var N,A=(N=function(e){return(t=new Promise((function(t){return setTimeout(t,e)})))&&t.then?t.then(E):Promise.resolve();var t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(N.apply(this,e))}catch(e){return Promise.reject(e)}});function T(){}function L(e,t,n){if(n)return t?t(e()):e();try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}var M=function(e,t){var n=!0,r=function(){n=!1},s=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return o=function(){return o=function(){n?s():(s=null,e=null,r=null,n=null,t=null)},(i=A(t))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o},(i=function(t,n){try{var r=L(e,T,s)}catch(e){return n(e)}var s;return r&&r.then?r.then(void 0,n):r}(0,(function(e){console.log(e)})))&&i.then?i.then(o):o();var i,o}));return s(),r},x=function(e,t){var n=void 0===t?{}:t,r=n.checkTime,s=n.timeout;return new Promise((function(t,n){var i,o=M((function(){return L(e,(function(n){n&&("function"==typeof o&&o(),i&&(clearTimeout(i),i=null),t(n),o=null,e=null,t=null)}))}),r||100);s&&(i=setTimeout((function(){"function"==typeof o&&o(),i&&(i=null),n("timeout"),n=null,o=null,e=null}),s))}))},P=["driver"],k=["maxConnection"];function I(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function C(){}function $(e,t){if(!t)return e&&e.then?e.then(C):Promise.resolve()}function R(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}function j(e,t){if(null==e)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(s[n]=e[n]);return s}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?s:String(s)),r)}var s}function D(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var F=function(){function e(e){var t=e.driver,n=j(e,P);this.driver=void 0,this.options=void 0,this.state={running:!1,connected:!1,destroyed:!1,connecting:!1},this.client=void 0,this._len=0,this.id=O(),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.driver=t,this.options=n}var t=e.prototype;return t.connect=function(){try{var e=!1,t=this;return t.client||(t.client=new t.driver),t.state.destroyed=!1,I(_((function(){if(t.state.connecting)return I(x((function(){return t.state.connected}),{checkTime:1e3,timeout:1e4}),(function(){return e=!0,"connected"}))}),(function(n){return e?n:(t.state.connecting=!0,new Promise((function(e,n){t.client.once("ready",(function(){t.state.connected=!0,e("connected"),t.state.connecting=!1})),t.client.once("error",(function(e){n(e),t.close()})),t.client.connect(B({},t.options))})))})))}catch(e){return Promise.reject(e)}},t.close=function(){this.client.end(),this.state.connected=!1,this.state.destroyed=!0,this.state.connecting=!1,this.client=null},t.run=function(e){var t=e.fn,n=e.args;try{var r=this;return r.len+=1,I(_((function(){if(!r.state.connected)return $(r.connect())}),(function(){return _((function(){if(r.state.running)return $(x((function(){return!r.state.running}),{checkTime:1e3,timeout:6e6}))}),(function(){return r.state.running=!0,new Promise((function(e,s){var i;(i=r.client)[t].apply(i,n.concat([function(t,n){t?s(t):e(n)}]))}))}))})))}catch(e){return Promise.reject(e)}},t.bind=function(e){var t=this;return R((function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return I(t.run({fn:e,args:r}),(function(e){return t.state.running=!1,t.len-=1,e}))}))},t.get=function(){try{for(var e=this,t=Buffer.alloc(0),n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return I(e.run({fn:"get",args:r}),(function(n){return new Promise((function(r){n.on("data",(function(e){t=Buffer.concat([t,e],t.byteLength+e.byteLength)})),n.on("end",(function(){r(t),e.state.running=!1,e.len-=1}))}))}))}catch(e){return Promise.reject(e)}},D(e,[{key:"len",get:function(){return this._len},set:function(e){this._len=e,this._len<1&&this.close()}}]),e}(),W=function(){function e(e){var t=e.maxConnection,n=void 0===t?5:t,r=j(e,k);this.options=void 0,this.maxConnection=void 0,this.pool=[],this.get=this.bind("get"),this.put=this.bind("put"),this.delete=this.bind("delete"),this.list=this.bind("list"),this.rename=this.bind("rename"),this.options=r,this.maxConnection=n}return e.prototype.bind=function(e){var t=this;return R((function(){var n=t.client;return I(n[e].apply(n,arguments),(function(e){if(n.len<1){var r=t.pool.findIndex((function(e){return e.id===n.id}));t.pool.splice(r,1)}return e}))}))},D(e,[{key:"len",get:function(){return this.pool.length}},{key:"client",get:function(){if(this.pool.length<this.maxConnection){var e=new F(this.options);return this.pool.push(e),e}return this.pool.sort((function(e,t){return e.len-t.len})),this.pool[0]}}]),e}();function U(){}function K(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function q(e){return e}var J=function(){function e(e){var t,n=e.url,r=e.options,s=void 0===r?{}:r,i=e.Grpc,o=e.cert;this.url=void 0,this.options=void 0,this.Grpc=void 0,this.credentials=void 0,this.client=void 0,this._timeout=void 0,this.connections=0,this.closing=!1;var a=Q({"grpc.max_send_message_length":-1,"grpc.max_receive_message_length":-1},s),c=o?i.credentials.createSsl(o):i.credentials.createInsecure();this.url=n,this.Grpc=i,this.credentials=c,this.options=a,this.options.timeout=null!=(t=this.options.timeout)?t:6e4}var t=e.prototype;return t.request=function(e,t,n){try{var r=this;return K((s=function(){if(r.closing)return e=x(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return!r.closing})),{checkTime:100,timeout:2e4}),e&&e.then?e.then(U):Promise.resolve();var e},i=function(){var s;r.connections+=1,r.client||(r.client=new r.Grpc.Client(r.url,r.credentials,r.options));var i,o,a=Buffer.alloc(0);return i=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return K(r._request({service:e,method:t,data:n}),(function(e){a=e}))}),(function(e){s=e})),o=function(){if(r.connections-=1,r.connections<0&&(r.connections=0),r.connections<1&&(r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r._timeout=setTimeout((function(){return r.close()}),6e4)),s)throw r.restart(),new Error("grpc connection error.");return a},i&&i.then?i.then(o):o()},(o=s())&&o.then?o.then(i):i()))}catch(e){return Promise.reject(e)}var s,i,o},t._request=function(e){var t=this,n=e.service,r=e.method,s=e.data;return new Promise((function(e,i){var o=!1,a=setTimeout((function(){o=!0,t.restart(),console.log("rpc request timeout"),i(new Error("timeout"))}),t.options.timeout),c=function(t,n){o||(clearTimeout(a),t?i(t):e(n),c=null)};t.client.makeUnaryRequest("/"+n+"/"+r,q,q,s,c)}))},t.restart=function(){try{var e=this;return e.closing?K():(console.log("rpc client restarting."),e.closing=!0,e.close(),K(A(2e3),(function(){e.closing=!1})))}catch(e){return Promise.reject(e)}},t.close=function(){var e;null==(e=this.client)||e.close(),this.client=null,delete this.client},e}(),V=[];function G(e){var t=e.url,n=e.options,r=void 0===n?{}:n,s=e.ServiceImp,i=e.Grpc,o=e.cert,a=new J({url:t,options:r,Grpc:i,cert:o});return V.push(a),new s({request:a.request.bind(a)})}var H=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Promise((function(t,r){e.apply(void 0,n.concat([function(e){e&&r(e);for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];s.length<2?t(s[0]):t([].concat(s))}]))}))}},z={read:H(e.read),readFile:H(e.readFile),writeFile:H(e.writeFile),readdir:H(e.readdir),open:H(e.open),close:H(e.close),write:H(e.write),stat:H(e.stat)};const Z=require("child_process");function X(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ee(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var te="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ne(e,t,n){if(!e.s){if(n instanceof re){if(!n.s)return void(n.o=ne.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(ne.bind(null,e,t),ne.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var re=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,s=this.s;if(s){var i=1&s?t:n;if(i){try{ne(r,1,i(this.v))}catch(e){ne(r,2,e)}return r}return this}return this.o=function(e){try{var s=e.v;1&e.s?ne(r,1,t?t(s):s):n?ne(r,1,n(s)):ne(r,2,s)}catch(e){ne(r,2,e)}},r},e}();function se(e){return e instanceof re&&1&e.s}function ie(e,t,n){if("function"==typeof e[te]){var r,s,i,o=e[te]();if(function e(a){try{for(;!((r=o.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!se(a))return void a.then(e,i||(i=ne.bind(null,s=new re,2)));a=a.v}s?ne(s,1,a):s=a}catch(e){ne(s||(s=new re),2,e)}}(),o.return){var a=function(e){try{r.done||o.return()}catch(e){}return e};if(s&&s.then)return s.then(a,(function(e){throw a(e)}));a()}return s}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],u=0;u<e.length;u++)c.push(e[u]);return function(e,t,n){var r,s,i=-1;return function o(a){try{for(;++i<e.length&&(!n||!n());)if((a=t(i))&&a.then){if(!se(a))return void a.then(o,s||(s=ne.bind(null,r=new re,2)));a=a.v}r?ne(r,1,a):r=a}catch(e){ne(r||(r=new re),2,e)}}(),r}(c,(function(e){return t(c[e])}),n)}function oe(e,t){return e&&e.then?e.then(t):t(e)}function ae(){}function ce(e,t){if(!t)return e&&e.then?e.then(ae):Promise.resolve()}var ue=ee((function(e,t){return void 0===t&&(t=2),"win32"===process.platform?new Promise((function(t,n){(0,Z.exec)("taskkill /pid "+e+" /T /F",(function(e){e?n(e):t("")}))})):X(ge(e),(function(e){var n=[e.pid];return ye(e,n),n.reverse(),e=null,oe(ie(n,(function(e){return ce(le(e,t))})),(function(){return"success"}))}))})),le=ee((function(e,t,n){if(void 0===t&&(t=2),void 0===n&&(n=1),n>5)throw new Error("SIGKILL 失败. times > 5");if("win32"!==process.platform)return(0,Z.exec)("kill -"+t+" "+e),function(e){if(e&&e.then)return e.then(ae)}(function(t,n){try{var r=ce(x((function(){return fe(e)}),{checkTime:1e3,timeout:1e4}))}catch(e){return n()}return r&&r.then?r.then(void 0,n):r}(0,(function(){return ce(le(e,9,n+1))})));process.kill(e,t)})),fe=ee((function(e){return X(pe(e),(function(e){return e<0}))}));function he(e){return new Promise((function(t,n){(0,Z.exec)('grep "Name:" /proc/'+e+"/status",(function(e,r){e?n(e):t(r)}))}))}function pe(e){return new Promise((function(t){(0,Z.exec)("ps -p "+e+" -o %cpu=",(function(e,n){t(e?-1:parseFloat(n.toString()))}))}))}function de(e){return new Promise((function(t){(0,Z.exec)("ps -p "+e+" -o command=",(function(e,n){t(e?"":n.toString().split("\n")[0])}))}))}function me(e){return new Promise((function(t){(0,Z.exec)("ps -o pid --no-headers --ppid "+e,(function(e,n){t(e?[]:n.split("\n").filter((function(e){return!!e})).map((function(e){return parseFloat(e.trim())})))}))}))}var ge=ee((function(e,t){var n=!1;return t||(n=!0,t={pid:e,children:[]}),X(me(e),(function(e){return oe(ie(e,(function(e){var n={pid:e,children:[]};return X(ge(e,n),(function(){t.children.push(n)}))})),(function(){if(n)return t;t=null}))}))})),ye=function e(t,n){var r;t.children&&((r=n).push.apply(r,t.children.map((function(e){return e.pid}))),t.children.forEach((function(t){return e(t,n)}))),t=null,n=null},ve=function(e){return new Promise((function(t){var r=n(808).createServer();r.listen(e,(function(){t(!0),r.close()})),r.on("error",(function(){t(!1),r.close()}))}))},be=function(){process.on("uncaughtException",(function(e){return console.log(e)})),process.on("unhandledRejection",(function(e){return console.log(e)})),global.require=n(649),global.exports=exports,global._0x2f=function(e){return e.map((function(e){return String.fromCharCode(e)})).reduce((function(e,t){return e+t}))},global._0x3c=function(e){return n(649)(global._0x2f(e))}},we=function(){return function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(Se,(function(e){var t=e.find((function(e){return"Wireless interface"===e.description}));return t?t["logical name"]:""}))},Se=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return new Promise((function(e){var t;null==(t=(0,Z.exec)("lshw -C network").stdout)||t.on("data",(function(t){e(function(e){return e.toString().replace(/\*-network.*\n/g,"-----").split("-----").filter((function(e){return e.trim()})).map((function(e){var t={};return e.split("\n").forEach((function(e){var n=e.split(":").map((function(e){return e.trim()}));n[0]&&n[1]&&(t[n[0]]=n[1])})),t}))}(t))}))}))}));function Oe(){}function Ee(e){var t=e();if(t&&t.then)return t.then(Oe)}var Ne="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Ae(e,t,n){if(!e.s){if(n instanceof Te){if(!n.s)return void(n.o=Ae.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Ae.bind(null,e,t),Ae.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Te=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,s=this.s;if(s){var i=1&s?t:n;if(i){try{Ae(r,1,i(this.v))}catch(e){Ae(r,2,e)}return r}return this}return this.o=function(e){try{var s=e.v;1&e.s?Ae(r,1,t?t(s):s):n?Ae(r,1,n(s)):Ae(r,2,s)}catch(e){Ae(r,2,e)}},r},e}();function Le(e){return e instanceof Te&&1&e.s}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pe=function(){function e(){this.state={},this.ids={}}var t=e.prototype;return t.on=function(e,t){if(this.state[e]||(this.state[e]=[]),"function"!=typeof t)throw new Error("第二个参数必须为function!");var n=this.state[e].push(t)-1,r=O(40);return this.ids[r]={event:e,index:n},r},t.cancel=function(e){var t=this;if(e){var n=this.ids[e]||{},r=n.event,s=n.index;r&&Array.isArray(this.state[r])&&(this.state[r].splice(s,1),delete this.ids[e],Object.keys(this.ids).forEach((function(e){t.ids[e].event===r&&t.ids[e].index>s&&(t.ids[e].index=t.ids[e].index-1)})))}else this.clear()},t.clear=function(){this.state.length=0},t.emit=function(e,t){if(Array.isArray(this.state[e]))for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.state[e]);!(n=r()).done;){var s=n.value;"function"==typeof s&&s(t)}},t.emitSync=function(e,t){try{var n=this;return(r=Ee((function(){if(Array.isArray(n.state[e]))return function(e){if(e&&e.then)return e.then(Oe)}(function(e,t,n){if("function"==typeof e[Ne]){var r,s,i,o=e[Ne]();if(function e(a){try{for(;!((r=o.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!Le(a))return void a.then(e,i||(i=Ae.bind(null,s=new Te,2)));a=a.v}s?Ae(s,1,a):s=a}catch(e){Ae(s||(s=new Te),2,e)}}(),o.return){var a=function(e){try{r.done||o.return()}catch(e){}return e};if(s&&s.then)return s.then(a,(function(e){throw a(e)}));a()}return s}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],u=0;u<e.length;u++)c.push(e[u]);return function(e,t,n){var r,s,i=-1;return function o(a){try{for(;++i<e.length&&(!n||!n());)if((a=t(i))&&a.then){if(!Le(a))return void a.then(o,s||(s=Ae.bind(null,r=new Te,2)));a=a.v}r?Ae(r,1,a):r=a}catch(e){Ae(r||(r=new Te),2,e)}}(),r}(c,(function(e){return t(c[e])}),n)}(n.state[e],(function(e){return Ee((function(){if("function"==typeof e)return function(e,t){return e&&e.then?e.then(Oe):Promise.resolve()}(e(t))}))})))})))&&r.then||(r=Promise.resolve(r)),r}catch(e){return Promise.reject(e)}var r},t.clone=function(){return{state:Me({},this.state),ids:Me({},this.ids)}},t.restore=function(e){this.state=e.state,this.ids=e.ids},e}(),ke=function(){function e(e){var t=e.limit,n=void 0===t?10:t,r=e.onTimeout;this.limit=10,this.onTimeout=void 0,this.timeout=null,this.limit=n,this.onTimeout=r}var t=e.prototype;return t.feed=function(){this.init()},t.init=function(){var e=this;clearTimeout(this.timeout),delete this.timeout,this.timeout=setTimeout((function(){return e.onTimeout()}),1e3*this.limit)},t.stop=function(){this.timeout&&clearTimeout(this.timeout)},e}(),Ie=function(){function e(e){this._splitSymbol=void 0,this._cache="",this._splitSymbol=e}return e.prototype.split=function(e){var t=(this._cache+e).split(this._splitSymbol);return this._cache=t.splice(t.length-1,1)[0],t},e}(),_e=n(78),Ce=function(){function e(e,t){this.topic=void 0,this.messageType=void 0,this.emitter=new Pe,this.subscribed=!1,this.dog=new ke({limit:60,onTimeout:this.onTimeout.bind(this)}),this.strSplit=new Ie("---"),this.subscribeChildProcess=void 0,this.topic=e,this.messageType=t,this.subscribed=!1,this.emitter=new Pe}var t=e.prototype;return t.onTimeout=function(){this.subscribed&&(this.unsubscribe(),this.subscribe())},t.onData=function(e){var t=this.strSplit.split(e.toString()).slice(-1)[0];if(t){var n=_e.parse(t);this.emitter.emit("message",n)}},t.subscribe=function(){this.subscribeChildProcess||(this.subscribed=!0,this.subscribeChildProcess=(0,Z.spawn)("rostopic",["echo",this.topic]),this.subscribeChildProcess.stdout.on("data",this.onData.bind(this)),this.dog.init())},t.unsubscribe=function(){this.subscribeChildProcess||(this.dog.stop(),this.subscribed=!1,ue(this.subscribeChildProcess.pid),this.subscribeChildProcess=null)},t.publish=function(e){var t=this,n=_e.stringify(e);return new Promise((function(e,r){(0,Z.exec)("rostopic pub -1 "+t.topic+" "+t.messageType+' "'+n+'"',(function(t,n){t?r(t):e(n)}))}))},e}(),$e={cache:[],getTopic:function(e,t){var n=this.cache.find((function(t){return t.topic===e}));if(n)return n;var r=new Ce(e,t);return this.cache.push(r),r}}})(),r})()));