prettier 2.1.2 → 2.3.1
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/README.md +3 -3
- package/bin-prettier.js +12967 -10861
- package/doc.js +3219 -2190
- package/esm/parser-angular.mjs +67 -0
- package/esm/parser-babel.mjs +22 -0
- package/esm/parser-espree.mjs +22 -0
- package/esm/parser-flow.mjs +22 -0
- package/esm/parser-glimmer.mjs +1 -0
- package/esm/parser-graphql.mjs +1 -0
- package/esm/parser-html.mjs +132 -0
- package/esm/parser-markdown.mjs +34 -0
- package/esm/parser-meriyah.mjs +22 -0
- package/esm/parser-postcss.mjs +22 -0
- package/esm/parser-typescript.mjs +22 -0
- package/esm/parser-yaml.mjs +15 -0
- package/esm/standalone.mjs +76 -0
- package/index.js +23033 -17556
- package/package.json +3 -2
- package/parser-angular.js +61 -40
- package/parser-babel.js +22 -1
- package/parser-espree.js +22 -0
- package/parser-flow.js +22 -1
- package/parser-glimmer.js +1 -1
- package/parser-graphql.js +1 -1
- package/parser-html.js +82 -63
- package/parser-markdown.js +24 -9
- package/parser-meriyah.js +22 -0
- package/parser-postcss.js +22 -8
- package/parser-typescript.js +22 -14
- package/parser-yaml.js +2 -2
- package/standalone.js +63 -2
- package/third-party.js +1070 -968
package/parser-yaml.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.yaml=t())}(this,(function(){"use strict";var e=function(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n};var t={isPragma:function(e){return/^\s*@(prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e)},insertPragma:function(e){return
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.yaml=t())}(this,(function(){"use strict";var e=function(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n};var t={isPragma:function(e){return/^\s*@(prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e)},insertPragma:function(e){return`# @format\n\n${e}`}};var n={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}};function r(e){var t={exports:{}};return e(t,t.exports),t.exports
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */(null==t&&n.path)}},n.exports),n.exports}var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i}function a(e){return this instanceof a?(this.v=e,this):new a(e)}var c,u=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return o},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},__decorate:function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:s,__read:i,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,o++)r[o]=s[i];return r},__await:a,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||c(e,t)}))})}function c(e,t){try{(n=o[e](t)).value instanceof a?Promise.resolve(n.value.v).then(u,l):f(s[0][2],n)}catch(e){f(s[0][3],e)}var n}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:a(e[r](t)),done:"return"===r}:o?o(t):t}:o}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),l=n((function(e,t){var n=function(){function e(e){this.string=e;for(var t=[0],n=0;n<e.length;)switch(e[n]){case"\n":n+="\n".length,t.push(n);break;case"\r":"\n"===e[n+="\r".length]&&(n+="\n".length),t.push(n);break;default:n++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=n})),f=n((function(e,t){t.__esModule=!0,t.defineParents=function e(t,n){void 0===n&&(n=null),"children"in t&&t.children.forEach((function(n){return e(n,t)})),"anchor"in t&&t.anchor&&e(t.anchor,t),"tag"in t&&t.tag&&e(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach((function(n){return e(n,t)})),"middleComments"in t&&t.middleComments.forEach((function(n){return e(n,t)})),"indicatorComment"in t&&t.indicatorComment&&e(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&e(t.trailingComment,t),"endComments"in t&&t.endComments.forEach((function(n){return e(n,t)})),Object.defineProperty(t,"_parent",{value:n,enumerable:!1})}})),h=n((function(e,t){t.__esModule=!0,t.getPointText=function(e){return e.line+":"+e.column}})),p=n((function(e,t){function n(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return 0===e.children.length||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case"sequenceItem":return t.position.start.column>e.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(0===e.children.length||1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type)&&("mappingValue"===e.type||r(e));default:return!1}}function r(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}t.__esModule=!0,t.attachComments=function(e){f.defineParents(e);var t=function(e){for(var t=Array.from(new Array(e.position.end.line),(function(){return{}})),n=0,r=e.comments;n<r.length;n++){var o=r[n];t[o.position.start.line-1].comment=o}return function e(t,n){if(n.position.start.offset===n.position.end.offset)return;if("leadingComments"in n){var r=n.position.start,o=t[r.line-1].leadingAttachableNode;(!o||r.column<o.position.start.column)&&(t[r.line-1].leadingAttachableNode=n)}if("trailingComment"in n&&n.position.end.column>1&&"document"!==n.type&&"documentHead"!==n.type){var s=n.position.end,i=t[s.line-1].trailingAttachableNode;(!i||s.column>=i.position.end.column)&&(t[s.line-1].trailingAttachableNode=n)}if("root"!==n.type&&"document"!==n.type&&"documentHead"!==n.type&&"documentBody"!==n.type)for(var a=n.position,c=(r=a.start,0),u=[(s=a.end).line].concat(r.line===s.line?[]:r.line);c<u.length;c++){var l=u[c],f=t[l-1].trailingNode;(!f||s.column>=f.position.end.column)&&(t[l-1].trailingNode=n)}"children"in n&&n.children.forEach((function(n){e(t,n)}))}(t,e),t}(e),o=e.children.slice();e.comments.sort((function(e,t){return e.position.start.offset-t.position.end.offset})).filter((function(e){return!e._parent})).forEach((function(e){for(;o.length>1&&e.position.start.line>o[0].position.end.line;)o.shift();!function(e,t,o){var s=e.position.start.line,i=t[s-1].trailingAttachableNode;if(i){if(i.trailingComment)throw new Error("Unexpected multiple trailing comment at "+h.getPointText(e.position.start));return f.defineParents(e,i),void(i.trailingComment=e)}for(var a=s;a>=o.position.start.line;a--){var c=t[a-1].trailingNode,u=void 0;if(c)u=c;else{if(a===s||!t[a-1].comment)continue;u=t[a-1].comment._parent}if("sequence"!==u.type&&"mapping"!==u.type||(u=u.children[0]),"mappingItem"===u.type){var l=u.children,p=l[0],d=l[1];u=r(p)?p:d}for(;;){if(n(u,e))return f.defineParents(e,u),void u.endComments.push(e);if(!u._parent)break;u=u._parent}break}for(a=s+1;a<=o.position.end.line;a++){var g=t[a-1].leadingAttachableNode;if(g)return f.defineParents(e,g),void g.leadingComments.push(e)}var m=o.children[1];f.defineParents(e,m),m.endComments.push(e)}(e,t,o[0])}))}})),d=n((function(e,t){t.__esModule=!0,t.createNode=function(e,t){return{type:e,position:t}}})),g=(c=u)&&c.default||c,m=n((function(e,t){t.__esModule=!0,t.createRoot=function(e,t,n){return g.__assign(g.__assign({},d.createNode("root",e)),{children:t,comments:n})}})),y=n((function(e,t){t.__esModule=!0,t.removeCstBlankLine=function e(t){switch(t.type){case"DOCUMENT":for(var n=t.contents.length-1;n>=0;n--)"BLANK_LINE"===t.contents[n].type?t.contents.splice(n,1):e(t.contents[n]);for(n=t.directives.length-1;n>=0;n--)"BLANK_LINE"===t.directives[n].type&&t.directives.splice(n,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(n=t.items.length-1;n>=0;n--){var r=t.items[n];"char"in r||("BLANK_LINE"===r.type?t.items.splice(n,1):e(r))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&e(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error("Unexpected node type "+JSON.stringify(t.type))}}})),v=n((function(e,t){t.__esModule=!0,t.createLeadingCommentAttachable=function(){return{leadingComments:[]}}})),_=n((function(e,t){t.__esModule=!0,t.createTrailingCommentAttachable=function(e){return void 0===e&&(e=null),{trailingComment:e}}})),w=n((function(e,t){t.__esModule=!0,t.createCommentAttachable=function(){return g.__assign(g.__assign({},v.createLeadingCommentAttachable()),_.createTrailingCommentAttachable())}})),E=n((function(e,t){t.__esModule=!0,t.createAlias=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("alias",e)),w.createCommentAttachable()),t),{value:n})}})),b=n((function(e,t){t.__esModule=!0,t.transformAlias=function(e,t){var n=e.cstNode;return E.createAlias(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}})),S=n((function(e,t){t.__esModule=!0,t.createBlockFolded=function(e){return g.__assign(g.__assign({},e),{type:"blockFolded"})}})),A=n((function(e,t){t.__esModule=!0,t.createBlockValue=function(e,t,n,r,o,s){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("blockValue",e)),v.createLeadingCommentAttachable()),t),{chomping:n,indent:r,value:o,indicatorComment:s})}})),M=n((function(e,t){t.__esModule=!0,function(e){e.Tag="!",e.Anchor="&",e.Comment="#"}(t.PropLeadingCharacter||(t.PropLeadingCharacter={}))})),O=n((function(e,t){t.__esModule=!0,t.createAnchor=function(e,t){return g.__assign(g.__assign({},d.createNode("anchor",e)),{value:t})}})),L=n((function(e,t){t.__esModule=!0,t.createComment=function(e,t){return g.__assign(g.__assign({},d.createNode("comment",e)),{value:t})}})),N=n((function(e,t){t.__esModule=!0,t.createContent=function(e,t,n){return{anchor:t,tag:e,middleComments:n}}})),T=n((function(e,t){t.__esModule=!0,t.createTag=function(e,t){return g.__assign(g.__assign({},d.createNode("tag",e)),{value:t})}})),C=n((function(e,t){t.__esModule=!0,t.transformContent=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,o=[],s=null,i=null,a=null,c=0,u=r.props;c<u.length;c++){var l=u[c],f=t.text[l.origStart];switch(f){case M.PropLeadingCharacter.Tag:s=s||l,i=T.createTag(t.transformRange(l),e.tag);break;case M.PropLeadingCharacter.Anchor:s=s||l,a=O.createAnchor(t.transformRange(l),r.anchor);break;case M.PropLeadingCharacter.Comment:var h=L.createComment(t.transformRange(l),t.text.slice(l.origStart+1,l.origEnd));t.comments.push(h),!n(h)&&s&&s.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&o.push(h);break;default:throw new Error("Unexpected leading character "+JSON.stringify(f))}}return N.createContent(i,a,o)}})),x=n((function(e,t){var n;t.__esModule=!0,function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"}(n||(n={})),t.transformAstBlockValue=function(e,t){var r=e.cstNode,o="CLIP"===r.chomping?0:1,s=r.header.origEnd-r.header.origStart-1-o!=0,i=t.transformRange({origStart:r.header.origStart,origEnd:r.valueRange.origEnd}),a=null,c=C.transformContent(e,t,(function(e){if(!(i.start.offset<e.position.start.offset&&e.position.end.offset<i.end.offset))return!1;if(a)throw new Error("Unexpected multiple indicator comments at "+h.getPointText(e.position.start));return a=e,!0}));return A.createBlockValue(i,c,n[r.chomping],s?r.blockIndent:null,r.strValue,a)}})),P=n((function(e,t){t.__esModule=!0,t.transformBlockFolded=function(e,t){return S.createBlockFolded(x.transformAstBlockValue(e,t))}})),R=n((function(e,t){t.__esModule=!0,t.createBlockLiteral=function(e){return g.__assign(g.__assign({},e),{type:"blockLiteral"})}})),I=n((function(e,t){t.__esModule=!0,t.transformBlockLiteral=function(e,t){return R.createBlockLiteral(x.transformAstBlockValue(e,t))}})),k=n((function(e,t){t.__esModule=!0,t.transformComment=function(e,t){return L.createComment(t.transformRange(e.range),e.comment)}})),B=n((function(e,t){t.__esModule=!0,t.createDirective=function(e,t,n){return g.__assign(g.__assign(g.__assign({},d.createNode("directive",e)),w.createCommentAttachable()),{name:t,parameters:n})}})),Y=n((function(e,t){t.__esModule=!0,t.extractPropComments=function(e,t){for(var n=0,r=e.props;n<r.length;n++){var o=r[n],s=t.text[o.origStart];switch(s){case M.PropLeadingCharacter.Comment:t.comments.push(L.createComment(t.transformRange(o),t.text.slice(o.origStart+1,o.origEnd)));break;default:throw new Error("Unexpected leading character "+JSON.stringify(s))}}}})),D=n((function(e,t){t.__esModule=!0,t.transformDirective=function(e,t){return Y.extractPropComments(e,t),B.createDirective(t.transformRange(e.range),e.name,e.parameters)}})),U=n((function(e,t){t.__esModule=!0,t.createDocument=function(e,t,n,r){return g.__assign(g.__assign(g.__assign({},d.createNode("document",e)),_.createTrailingCommentAttachable(r)),{children:[t,n]})}})),F=n((function(e,t){t.__esModule=!0,t.createPosition=function(e,t){return{start:e,end:t}},t.createEmptyPosition=function(e){return{start:e,end:e}}})),j=n((function(e,t){t.__esModule=!0,t.createEndCommentAttachable=function(e){return void 0===e&&(e=[]),{endComments:e}}})),W=n((function(e,t){t.__esModule=!0,t.createDocumentBody=function(e,t,n){return g.__assign(g.__assign(g.__assign({},d.createNode("documentBody",e)),j.createEndCommentAttachable(n)),{children:t?[t]:[]})}})),Q=n((function(e,t){t.__esModule=!0,t.getLast=function(e){return e[e.length-1]}})),V=n((function(e,t){t.__esModule=!0,t.getMatchIndex=function(e,t){var n=e.match(t);return n?n.index:-1}})),K=n((function(e,t){t.__esModule=!0,t.transformDocumentBody=function(e,t,n){var r,o=e.cstNode,s=function(e,t,n){for(var r=[],o=[],s=[],i=[],a=!1,c=e.contents.length-1;c>=0;c--){var u=e.contents[c];if("COMMENT"===u.type){var l=t.transformNode(u);n&&n.line===l.position.start.line?i.unshift(l):a?r.unshift(l):l.position.start.offset>=e.valueRange.origEnd?s.unshift(l):r.unshift(l)}else a=!0}if(s.length>1)throw new Error("Unexpected multiple document trailing comments at "+h.getPointText(s[1].position.start));if(i.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+h.getPointText(i[1].position.start));return{comments:r,endComments:o,documentTrailingComment:Q.getLast(s)||null,documentHeadTrailingComment:Q.getLast(i)||null}}(o,t,n),i=s.comments,a=s.endComments,c=s.documentTrailingComment,u=s.documentHeadTrailingComment,l=t.transformNode(e.contents),f=function(e,t,n){var r=V.getMatchIndex(n.text.slice(e.valueRange.origEnd),/^\.\.\./),o=-1===r?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);"\r"===n.text[o-1]&&o--;var s=n.transformRange({origStart:null!==t?t.position.start.offset:o,origEnd:o}),i=-1===r?s.end:n.transformOffset(e.valueRange.origEnd+3);return{position:s,documentEndPoint:i}}(o,l,t),p=f.position,d=f.documentEndPoint;return(r=t.comments).push.apply(r,g.__spreadArrays(i,a)),{documentBody:W.createDocumentBody(p,l,a),documentEndPoint:d,documentTrailingComment:c,documentHeadTrailingComment:u}}})),q=n((function(e,t){t.__esModule=!0,t.createDocumentHead=function(e,t,n,r){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("documentHead",e)),j.createEndCommentAttachable(n)),_.createTrailingCommentAttachable(r)),{children:t})}})),J=n((function(e,t){t.__esModule=!0,t.transformDocumentHead=function(e,t){var n,r=e.cstNode,o=function(e,t){for(var n=[],r=[],o=[],s=!1,i=e.directives.length-1;i>=0;i--){var a=t.transformNode(e.directives[i]);"comment"===a.type?s?r.unshift(a):o.unshift(a):(s=!0,n.unshift(a))}return{directives:n,comments:r,endComments:o}}(r,t),s=o.directives,i=o.comments,a=o.endComments,c=function(e,t,n){var r=V.getMatchIndex(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);var o=-1===r?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};0!==t.length&&(o.origStart=t[0].position.start.offset);return{position:n.transformRange(o),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(r,s,t),u=c.position,l=c.endMarkerPoint;return(n=t.comments).push.apply(n,g.__spreadArrays(i,a)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),q.createDocumentHead(u,s,a,e)},documentHeadEndMarkerPoint:l}}})),$=n((function(e,t){t.__esModule=!0,t.transformDocument=function(e,t){var n=J.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,o=n.documentHeadEndMarkerPoint,s=K.transformDocumentBody(e,t,o),i=s.documentBody,a=s.documentEndPoint,c=s.documentTrailingComment,u=r(s.documentHeadTrailingComment);return c&&t.comments.push(c),U.createDocument(F.createPosition(u.position.start,a),u,i,c)}})),G=n((function(e,t){t.__esModule=!0,t.createFlowCollection=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("flowCollection",e)),w.createCommentAttachable()),j.createEndCommentAttachable()),t),{children:n})}})),H=n((function(e,t){t.__esModule=!0,t.createFlowMapping=function(e,t,n){return g.__assign(g.__assign({},G.createFlowCollection(e,t,n)),{type:"flowMapping"})}})),z=n((function(e,t){t.__esModule=!0,t.createFlowMappingItem=function(e,t,n){return g.__assign(g.__assign(g.__assign({},d.createNode("flowMappingItem",e)),v.createLeadingCommentAttachable()),{children:[t,n]})}})),Z=n((function(e,t){t.__esModule=!0,t.extractComments=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var s=o[r];s&&"type"in s&&"COMMENT"===s.type?t.comments.push(t.transformNode(s)):n.push(s)}return n}})),X=n((function(e,t){t.__esModule=!0,t.getFlowMapItemAdditionalRanges=function(e){var t=["?",":"].map((function(t){var n=e.find((function(e){return"char"in e&&e.char===t}));return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null}));return{additionalKeyRange:t[0],additionalValueRange:t[1]}}})),ee=n((function(e,t){t.__esModule=!0,t.createSlicer=function(e,t){var n=t;return function(t){return e.slice(n,n=t)}}})),te=n((function(e,t){t.__esModule=!0,t.groupCstFlowCollectionItems=function(e){for(var t=[],n=ee.createSlicer(e,1),r=!1,o=1;o<e.length-1;o++){var s=e[o];"char"in s&&","===s.char?(t.push(n(o)),n(o+1),r=!1):r=!0}return r&&t.push(n(e.length-1)),t}})),ne=n((function(e,t){t.__esModule=!0,t.createMappingKey=function(e,t){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("mappingKey",e)),_.createTrailingCommentAttachable()),j.createEndCommentAttachable()),{children:t?[t]:[]})}})),re=n((function(e,t){t.__esModule=!0,t.createMappingValue=function(e,t){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("mappingValue",e)),w.createCommentAttachable()),j.createEndCommentAttachable()),{children:t?[t]:[]})}})),oe=n((function(e,t){t.__esModule=!0,t.transformAstPair=function(e,t,n,r,o){var s=t.transformNode(e.key),i=t.transformNode(e.value),a=s||r?ne.createMappingKey(t.transformRange({origStart:r?r.origStart:s.position.start.offset,origEnd:s?s.position.end.offset:r.origStart+1}),s):null,c=i||o?re.createMappingValue(t.transformRange({origStart:o?o.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:o.origStart+1}),i):null;return n(F.createPosition(a?a.position.start:c.position.start,c?c.position.end:a.position.end),a||ne.createMappingKey(F.createEmptyPosition(c.position.start),null),c||re.createMappingValue(F.createEmptyPosition(a.position.end),null))}})),se=n((function(e,t){t.__esModule=!0,t.transformFlowMap=function(e,t){var n=Z.extractComments(e.cstNode.items,t),r=te.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){var o=r[n],s=X.getFlowMapItemAdditionalRanges(o),i=s.additionalKeyRange,a=s.additionalValueRange;return oe.transformAstPair(e,t,z.createFlowMappingItem,i,a)})),s=n[0],i=Q.getLast(n);return H.createFlowMapping(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)}})),ie=n((function(e,t){t.__esModule=!0,t.createFlowSequence=function(e,t,n){return g.__assign(g.__assign({},G.createFlowCollection(e,t,n)),{type:"flowSequence"})}})),ae=n((function(e,t){t.__esModule=!0,t.createFlowSequenceItem=function(e,t){return g.__assign(g.__assign({},d.createNode("flowSequenceItem",e)),{children:[t]})}})),ce=n((function(e,t){t.__esModule=!0,t.transformFlowSeq=function(e,t){var n=Z.extractComments(e.cstNode.items,t),r=te.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){if("PAIR"!==e.type){var o=t.transformNode(e);return ae.createFlowSequenceItem(F.createPosition(o.position.start,o.position.end),o)}var s=r[n],i=X.getFlowMapItemAdditionalRanges(s),a=i.additionalKeyRange,c=i.additionalValueRange;return oe.transformAstPair(e,t,z.createFlowMappingItem,a,c)})),s=n[0],i=Q.getLast(n);return ie.createFlowSequence(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)}})),ue=n((function(e,t){t.__esModule=!0,t.createMapping=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("mapping",e)),v.createLeadingCommentAttachable()),t),{children:n})}})),le=n((function(e,t){t.__esModule=!0,t.createMappingItem=function(e,t,n){return g.__assign(g.__assign(g.__assign({},d.createNode("mappingItem",e)),v.createLeadingCommentAttachable()),{children:[t,n]})}})),fe=n((function(e,t){t.__esModule=!0,t.transformMap=function(e,t){var n=e.cstNode;n.items.filter((function(e){return"MAP_KEY"===e.type||"MAP_VALUE"===e.type})).forEach((function(e){return Y.extractPropComments(e,t)}));var r=function(e){for(var t=[],n=ee.createSlicer(e,0),r=!1,o=0;o<e.length;o++){"MAP_VALUE"!==e[o].type?(r&&t.push(n(o)),r=!0):(t.push(n(o+1)),r=!1)}r&&t.push(n(1/0));return t}(Z.extractComments(n.items,t)),o=e.items.map((function(e,n){var o=r[n],s="MAP_VALUE"===o[0].type?[null,o[0].range]:[o[0].range,1===o.length?null:o[1].range],i=s[0],a=s[1];return oe.transformAstPair(e,t,le.createMappingItem,i,a)}));return ue.createMapping(F.createPosition(o[0].position.start,Q.getLast(o).position.end),t.transformContent(e),o)}})),he=n((function(e,t){t.__esModule=!0,t.createPlain=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("plain",e)),w.createCommentAttachable()),t),{value:n})}})),pe=n((function(e,t){t.__esModule=!0,t.findLastCharIndex=function(e,t,n){for(var r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}})),de=n((function(e,t){t.__esModule=!0,t.transformPlain=function(e,t){var n=e.cstNode;return he.createPlain(t.transformRange({origStart:n.valueRange.origStart,origEnd:pe.findLastCharIndex(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}})),ge=n((function(e,t){t.__esModule=!0,t.createQuoteDouble=function(e){return g.__assign(g.__assign({},e),{type:"quoteDouble"})}})),me=n((function(e,t){t.__esModule=!0,t.createQuoteValue=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("quoteValue",e)),t),w.createCommentAttachable()),{value:n})}})),ye=n((function(e,t){t.__esModule=!0,t.transformAstQuoteValue=function(e,t){var n=e.cstNode;return me.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}})),ve=n((function(e,t){t.__esModule=!0,t.transformQuoteDouble=function(e,t){return ge.createQuoteDouble(ye.transformAstQuoteValue(e,t))}})),_e=n((function(e,t){t.__esModule=!0,t.createQuoteSingle=function(e){return g.__assign(g.__assign({},e),{type:"quoteSingle"})}})),we=n((function(e,t){t.__esModule=!0,t.transformQuoteSingle=function(e,t){return _e.createQuoteSingle(ye.transformAstQuoteValue(e,t))}})),Ee=n((function(e,t){t.__esModule=!0,t.createSequence=function(e,t,n){return g.__assign(g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("sequence",e)),v.createLeadingCommentAttachable()),j.createEndCommentAttachable()),t),{children:n})}})),be=n((function(e,t){t.__esModule=!0,t.createSequenceItem=function(e,t){return g.__assign(g.__assign(g.__assign(g.__assign({},d.createNode("sequenceItem",e)),w.createCommentAttachable()),j.createEndCommentAttachable()),{children:t?[t]:[]})}})),Se=n((function(e,t){t.__esModule=!0,t.transformSeq=function(e,t){var n=Z.extractComments(e.cstNode.items,t).map((function(n,r){Y.extractPropComments(n,t);var o=t.transformNode(e.items[r]);return be.createSequenceItem(F.createPosition(t.transformOffset(n.valueRange.origStart),null===o?t.transformOffset(n.valueRange.origStart+1):o.position.end),o)}));return Ee.createSequence(F.createPosition(n[0].position.start,Q.getLast(n).position.end),t.transformContent(e),n)}})),Ae=n((function(e,t){t.__esModule=!0,t.transformNode=function(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return b.transformAlias(e,t);case"BLOCK_FOLDED":return P.transformBlockFolded(e,t);case"BLOCK_LITERAL":return I.transformBlockLiteral(e,t);case"COMMENT":return k.transformComment(e,t);case"DIRECTIVE":return D.transformDirective(e,t);case"DOCUMENT":return $.transformDocument(e,t);case"FLOW_MAP":return se.transformFlowMap(e,t);case"FLOW_SEQ":return ce.transformFlowSeq(e,t);case"MAP":return fe.transformMap(e,t);case"PLAIN":return de.transformPlain(e,t);case"QUOTE_DOUBLE":return ve.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return we.transformQuoteSingle(e,t);case"SEQ":return Se.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}}})),Me=n((function(e,t){t.__esModule=!0,t.createError=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}})),Oe=n((function(e,t){t.__esModule=!0,t.transformError=function(e,t){var n=e.source.range||e.source.valueRange;return Me.createError(e.message,t.text,t.transformRange(n))}})),Le=n((function(e,t){t.__esModule=!0,t.createPoint=function(e,t,n){return{offset:e,line:t,column:n}}})),Ne=n((function(e,t){t.__esModule=!0,t.transformOffset=function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);var n=t.locator.locationForIndex(e);return Le.createPoint(e,n.line+1,n.column+1)}})),Te=n((function(e,t){t.__esModule=!0,t.transformRange=function(e,t){return F.createPosition(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))}})),Ce=n((function(e,t){t.__esModule=!0;t.addOrigRange=function(e){if(!e.setOrigRanges()){var t=function(e){return function(e){return"number"==typeof e.start}(e)?(e.origStart=e.start,e.origEnd=e.end,true):function(e){return"number"==typeof e.offset}(e)?(e.origOffset=e.offset,true):void 0};e.forEach((function(e){return function e(t,n){if(!t||"object"!=typeof t)return;if(true===n(t))return;for(var r=0,o=Object.keys(t);r<o.length;r++){var s=o[r];if("context"!==s&&"error"!==s){var i=t[s];Array.isArray(i)?i.forEach((function(t){return e(t,n)})):e(i,n)}}}(e,t)}))}}})),xe=n((function(e,t){t.__esModule=!0,t.removeFakeNodes=function e(t){if("children"in t){if(1===t.children.length){var n=t.children[0];if("plain"===n.type&&null===n.tag&&null===n.anchor&&""===n.value)return t.children.splice(0,1),t}t.children.forEach(e)}return t}})),Pe=n((function(e,t){t.__esModule=!0,t.createUpdater=function(e,t,n,r){var o=t(e);return function(t){r(o,t)&&n(e,o=t)}}})),Re=n((function(e,t){function n(e){return e.start}function r(e,t){e.start=t}function o(e){return e.end}function s(e,t){e.end=t}function i(e,t){return t.offset<e.offset}function a(e,t){return t.offset>e.offset}t.__esModule=!0,t.updatePositions=function e(t){if(null!==t&&"children"in t){var c=t.children;if(c.forEach(e),"document"===t.type){var u=t.children,l=u[0],f=u[1];l.position.start.offset===l.position.end.offset?l.position.start=l.position.end=f.position.start:f.position.start.offset===f.position.end.offset&&(f.position.start=f.position.end=l.position.end)}var h=Pe.createUpdater(t.position,n,r,i),p=Pe.createUpdater(t.position,o,s,a);"endComments"in t&&0!==t.endComments.length&&(h(t.endComments[0].position.start),p(Q.getLast(t.endComments).position.end));var d=c.filter((function(e){return null!==e}));if(0!==d.length){var g=d[0],m=Q.getLast(d);h(g.position.start),p(m.position.end),"leadingComments"in g&&0!==g.leadingComments.length&&h(g.leadingComments[0].position.start),"tag"in g&&g.tag&&h(g.tag.position.start),"anchor"in g&&g.anchor&&h(g.anchor.position.start),"trailingComment"in m&&m.trailingComment&&p(m.trailingComment.position.end)}}}}));const Ie={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},ke={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 Be(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 Ye(e){let t,n;return"string"==typeof e?(t=Be(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=Be(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function De(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=Ye(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 o=n.length;return{line:o,col:e-n[o-1]+1}}function Ue({start:e,end:t},n,r=80){let o=function(e,t){const{lineStarts:n,src:r}=Ye(t);if(!n||!(e>=1)||e>n.length)return null;const o=n[e-1];let s=n[e];for(;s&&s>o&&"\n"===r[s-1];)--s;return r.slice(o,s)}(e.line,n);if(!o)return null;let{col:s}=e;if(o.length>r)if(s<=r-10)o=o.substr(0,r-1)+"…";else{const e=Math.round(r/2);o.length>s+e&&(o=o.substr(0,s+e-1)+"…"),s-=o.length-r,o="…"+o.substr(1-r)}let i=1,a="";t&&(t.line===e.line&&s+(t.col-e.col)<=r+1?i=t.col-e.col:(i=Math.min(o.length+1,r)-s,a="…"));const c=s>1?" ".repeat(s-1):"",u="^".repeat(i);return"".concat(o,"\n").concat(c).concat(u).concat(a)}class Fe{static copy(e){return new Fe(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 o=t;for(;o<e.length&&!(e[o]>n);)++o;this.origStart=n+o;const s=o;for(;o<e.length&&!(e[o]>=r);)++o;return this.origEnd=r+o,s}}class je{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=je.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,n){const r=e[t];if(!r)return!0;const o=e[t-1];if(o&&"\n"!==o)return!1;if(n){if(r!==n)return!1}else if(r!==Ie.DIRECTIVES_END&&r!==Ie.DOCUMENT_END)return!1;const s=e[t+1],i=e[t+2];if(s!==r||i!==r)return!1;const a=e[t+3];return!a||"\n"===a||"\t"===a||" "===a}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,o=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===o.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=je.endOfIndent(e,n);if(r>n+t)return r;{const t=je.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:je.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,o=!1,s="",i=e[t+1];for(;" "===i||"\t"===i||"\n"===i;){switch(i){case"\n":r=0,t+=1,s+="\n";break;case"\t":r<=n&&(o=!0),t=je.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}i=e[t+1]}return s||(s=" "),i&&r<=n&&(o=!0),{fold:s,offset:t,error:o}}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,o=this.props[e];return o&&r[o.start]===t?r.slice(o.start+(n?1:0),o.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,Ie.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const n=this.getPropValue(t,Ie.COMMENT,!0);null!=n&&e.push(n)}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||je.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]===Ie.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]!==Ie.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[ke.FLOW_MAP,ke.FLOW_SEQ,ke.QUOTE_DOUBLE,ke.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=De(this.range.start,this.context.root);if(!e)return;return{start:e,end:De(this.range.end,this.context.root)}}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,Ie.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]===Ie.COMMENT){const n=je.endOfLine(t,e+1),r=new Fe(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 je.addStringTerminator(e,t.end,r)}}class We extends Error{constructor(e,t,n){if(!(n&&t instanceof je))throw new Error("Invalid arguments for new ".concat(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 Fe(this.offset,this.offset+1);const t=e&&De(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 ".concat(t,", column ").concat(n);const r=e&&Ue(this.linePos,e);r&&(this.message+=":\n\n".concat(r,"\n"))}delete this.source}}class Qe extends We{constructor(e,t){super("YAMLSemanticError",e,t)}}class Ve extends je{static endOfLine(e,t,n){let r=e[t],o=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[o+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;o+=1,r=t}return o}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 o="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=je.foldNewline(n,r,-1);o+=e,r=t}else if(" "===e||"\t"===e){const s=r;let i=n[r+1];for(;r<t&&(" "===i||"\t"===i);)r+=1,i=n[r+1];"\n"!==i&&(o+=r>s?n.slice(s,r+1):e)}else o+=e}const s=n[e];switch(s){case"\t":return{errors:[new Qe(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":{const e="Plain value cannot start with reserved character ".concat(s);return{errors:[new Qe(this,e)],str:o}}default:return o}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let o=e,s=e;for(let e=r[o];"\n"===e&&!je.atDocumentBoundary(r,o+1);e=r[o]){const e=je.endOfBlockIndent(r,t,o+1);if(null===e||"#"===r[e])break;"\n"===r[e]?o=e:(s=Ve.endOfLine(r,e,n),o=s)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let o=t;const s=r[o];return s&&"#"!==s&&"\n"!==s&&(o=Ve.endOfLine(r,t,n)),this.valueRange=new Fe(t,o),o=je.endOfWhiteSpace(r,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}var Ke={Char:Ie,Node:je,PlainValue:Ve,Range:Fe,Type:ke,YAMLError:We,YAMLReferenceError:class extends We{constructor(e,t){super("YAMLReferenceError",e,t)}},YAMLSemanticError:Qe,YAMLSyntaxError:class extends We{constructor(e,t){super("YAMLSyntaxError",e,t)}},YAMLWarning:class extends We{constructor(e,t){super("YAMLWarning",e,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},defaultTagPrefix:"tag:yaml.org,2002:",defaultTags:{MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}};class qe extends Ke.Node{constructor(){super(Ke.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new Ke.Range(t,t+1),t+1}}class Je extends Ke.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:r}=e;let{atLineStart:o,lineStart:s}=e;o||this.type!==Ke.Type.SEQ_ITEM||(this.error=new Ke.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const i=o?t-s:e.indent;let a=Ke.Node.endOfWhiteSpace(r,t+1),c=r[a];const u="#"===c,l=[];let f=null;for(;"\n"===c||"#"===c;){if("#"===c){const e=Ke.Node.endOfLine(r,a+1);l.push(new Ke.Range(a,e)),a=e}else{o=!0,s=a+1;"\n"===r[Ke.Node.endOfWhiteSpace(r,s)]&&0===l.length&&(f=new qe,s=f.parse({src:r},s)),a=Ke.Node.endOfIndent(r,s)}c=r[a]}if(Ke.Node.nextNodeIsIndented(c,a-(s+i),this.type!==Ke.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:i,lineStart:s,parent:this},a):c&&s>t+1&&(a=s-1),this.node){if(f){const t=e.parent.items||e.parent.contents;t&&t.push(f)}l.length&&Array.prototype.push.apply(this.props,l),a=this.node.range.end}else if(u){const e=l[0];this.props.push(e),a=e.end}else a=Ke.Node.endOfLine(r,t+1);const h=this.node?this.node.valueRange.end:a;return this.valueRange=new Ke.Range(t,h),a}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:r}=this;if(null!=r)return r;const o=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return Ke.Node.addStringTerminator(e,n.end,o)}}class $e extends Ke.Node{constructor(){super(Ke.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new Ke.Range(t,n),n}}function Ge(e){let t=e;for(;t instanceof Je;)t=t.node;if(!(t instanceof He))return null;const n=t.items.length;let r=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===Ke.Type.COMMENT){const{indent:t,lineStart:o}=n.context;if(t>0&&n.range.start>=o+t)break;r=e}else{if(n.type!==Ke.Type.BLANK_LINE)break;r=e}}if(-1===r)return null;const o=t.items.splice(r,n-r),s=o[0].range.start;for(;t.range.end=s,t.valueRange&&t.valueRange.end>s&&(t.valueRange.end=s),t!==e;)t=t.context.parent;return o}class He extends Ke.Node{static nextContentHasIndent(e,t,n){const r=Ke.Node.endOfLine(e,t)+1,o=e[t=Ke.Node.endOfWhiteSpace(e,r)];return!!o&&(t>=r+n||("#"===o||"\n"===o)&&He.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===Ke.Type.SEQ_ITEM?Ke.Type.SEQ:Ke.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=Ge(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:r}=e;let o=Ke.Node.startOfLine(r,t);const s=this.items[0];s.context.parent=this,this.valueRange=Ke.Range.copy(s.valueRange);const i=s.range.start-s.context.lineStart;let a=t;a=Ke.Node.normalizeOffset(r,a);let c=r[a],u=Ke.Node.endOfWhiteSpace(r,o)===a,l=!1;for(;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!l){const e=new qe;if(a=e.parse({src:r},a),this.valueRange.end=a,a>=r.length){c=null;break}this.items.push(e),a-=1}else if("#"===c){if(a<o+i&&!He.nextContentHasIndent(r,a,i))return a;const e=new $e;if(a=e.parse({indent:i,lineStart:o,src:r},a),this.items.push(e),this.valueRange.end=a,a>=r.length){c=null;break}}if(o=a+1,a=Ke.Node.endOfIndent(r,o),Ke.Node.atBlank(r,a)){const e=Ke.Node.endOfWhiteSpace(r,a),t=r[e];t&&"\n"!==t&&"#"!==t||(a=e)}c=r[a],u=!0}if(!c)break;if(a!==o+i&&(u||":"!==c)){if(a<o+i){o>t&&(a=o);break}if(!this.error){const e="All collection items must start at the same column";this.error=new Ke.YAMLSyntaxError(this,e)}}if(s.type===Ke.Type.SEQ_ITEM){if("-"!==c){o>t&&(a=o);break}}else if("-"===c&&!this.error){const e=r[a+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new Ke.YAMLSyntaxError(this,e)}}const e=n({atLineStart:u,inCollection:!0,indent:i,lineStart:o,parent:this},a);if(!e)return a;if(this.items.push(e),this.valueRange.end=e.valueRange.end,a=Ke.Node.normalizeOffset(r,e.range.end),c=r[a],u=!1,l=e.includesTrailingLines,c){let e=a-1,t=r[e];for(;" "===t||"\t"===t;)t=r[--e];"\n"===t&&(o=e+1,u=!0)}const f=Ge(e);f&&Array.prototype.push.apply(this.items,f)}return a}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:r}=this;if(null!=r)return r;let o=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)o+=" ";o+=String(n)}return Ke.Node.addStringTerminator(e,n.end,o)}}class ze extends Ke.Node{constructor(){super(Ke.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,r=t[n];for(;r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new Ke.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 Ke.Range(t,n),n}}class Ze extends Ke.Node{static startCommentOrEndBlankLine(e,t){const n=Ke.Node.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}constructor(){super(Ke.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,r=!1,o=e;for(;!Ke.Node.atDocumentBoundary(t,o,Ke.Char.DIRECTIVES_END);)switch(o=Ze.startCommentOrEndBlankLine(t,o),t[o]){case"\n":if(n){const e=new qe;o=e.parse({src:t},o),o<t.length&&this.directives.push(e)}else o+=1,n=!0;break;case"#":{const e=new $e;o=e.parse({src:t},o),this.directives.push(e),n=!1}break;case"%":{const e=new ze;o=e.parse({parent:this,src:t},o),this.directives.push(e),r=!0,n=!1}break;default:return r?this.error=new Ke.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new Ke.Range(o,o+3),o+3):(r?this.error=new Ke.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let r=e;for(;"-"===n[r-1];)r-=1;let o=Ke.Node.endOfWhiteSpace(n,e),s=r===e;for(this.valueRange=new Ke.Range(o);!Ke.Node.atDocumentBoundary(n,o,Ke.Char.DOCUMENT_END);){switch(n[o]){case"\n":if(s){const e=new qe;o=e.parse({src:n},o),o<n.length&&this.contents.push(e)}else o+=1,s=!0;r=o;break;case"#":{const e=new $e;o=e.parse({src:n},o),this.contents.push(e),s=!1}break;default:{const e=Ke.Node.endOfIndent(n,o),i=t({atLineStart:s,indent:-1,inFlow:!1,inCollection:!1,lineStart:r,parent:this},e);if(!i)return this.valueRange.end=e;this.contents.push(i),o=i.range.end,s=!1;const a=Ge(i);a&&Array.prototype.push.apply(this.contents,a)}}o=Ze.startCommentOrEndBlankLine(n,o)}if(this.valueRange.end=o,n[o]&&(this.documentEndMarker=new Ke.Range(o,o+3),o+=3,n[o])){if(o=Ke.Node.endOfWhiteSpace(n,o),"#"===n[o]){const e=new $e;o=e.parse({src:n},o),this.contents.push(e)}switch(n[o]){case"\n":o+=1;break;case void 0:break;default:this.error=new Ke.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return o}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 r=t.join("");return e.length>0&&((t.length>0||e[0].type===Ke.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}class Xe extends Ke.Node{parse(e,t){this.context=e;const{src:n}=e;let r=Ke.Node.endOfIdentifier(n,t+1);return this.valueRange=new Ke.Range(t+1,r),r=Ke.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}const et="CLIP",tt="KEEP",nt="STRIP";class rt extends Ke.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=et,this.header=null}get includesTrailingLines(){return this.chomping===tt}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:r}=this.context;if(this.valueRange.isEmpty())return"";let o=null,s=r[t-1];for(;"\n"===s||"\t"===s||" "===s;){if(t-=1,t<=e){if(this.chomping===tt)break;return""}"\n"===s&&(o=t),s=r[t-1]}let i=t+1;o&&(this.chomping===tt?(i=o,t=this.valueRange.end):t=o);const a=n+this.blockIndent,c=this.type===Ke.Type.BLOCK_FOLDED;let u=!0,l="",f="",h=!1;for(let n=e;n<t;++n){for(let e=0;e<a&&" "===r[n];++e)n+=1;const e=r[n];if("\n"===e)"\n"===f?l+="\n":f="\n";else{const o=Ke.Node.endOfLine(r,n),s=r.slice(n,o);n=o,c&&(" "===e||"\t"===e)&&n<i?(" "===f?f="\n":h||u||"\n"!==f||(f="\n\n"),l+=f+s,f=o<t&&r[o]||"",h=!0):(l+=f+s,f=c&&n<i?" ":"\n",h=!1),u&&""!==s&&(u=!1)}}return this.chomping===nt?l:l+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,r="";for(;;){const o=t[n];switch(o){case"-":this.chomping=nt;break;case"+":this.chomping=tt;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=o;break;default:return this.blockIndent=Number(r)||null,this.header=new Ke.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,r=!!this.blockIndent;let o=e,s=e,i=1;for(let e=n[o];"\n"===e&&(o+=1,!Ke.Node.atDocumentBoundary(n,o));e=n[o]){const e=Ke.Node.endOfBlockIndent(n,t,o);if(null===e)break;const a=n[e],c=e-(o+t);if(this.blockIndent){if(a&&"\n"!==a&&c<this.blockIndent){if("#"===n[e])break;if(!this.error){const e="Block scalars must not be less indented than their ".concat(r?"explicit indentation indicator":"first line");this.error=new Ke.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(c<i){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new Ke.YAMLSemanticError(this,e)}this.blockIndent=c}else c>i&&(i=c);o="\n"===n[e]?e:s=Ke.Node.endOfLine(n,e)}return this.chomping!==tt&&(o=n[s]?s+1:s),this.valueRange=new Ke.Range(e+1,o),o}parse(e,t){this.context=e;const{src:n}=e;let r=this.parseBlockHeader(t);return r=Ke.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class ot extends Ke.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===Ke.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let{indent:o,lineStart:s}=e,i=r[t];this.items=[{char:i,offset:t}];let a=Ke.Node.endOfWhiteSpace(r,t+1);for(i=r[a];i&&"]"!==i&&"}"!==i;){switch(i){case"\n":s=a+1;if("\n"===r[Ke.Node.endOfWhiteSpace(r,s)]){const e=new qe;s=e.parse({src:r},s),this.items.push(e)}if(a=Ke.Node.endOfIndent(r,s),a<=s+o&&(i=r[a],a<s+o||"]"!==i&&"}"!==i)){const e="Insufficient indentation in flow collection";this.error=new Ke.YAMLSemanticError(this,e)}break;case",":this.items.push({char:i,offset:a}),a+=1;break;case"#":{const e=new $e;a=e.parse({src:r},a),this.items.push(e)}break;case"?":case":":{const e=r[a+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===i&&this.prevNodeIsJsonLike()){this.items.push({char:i,offset:a}),a+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:s,parent:this},a);if(!e)return this.valueRange=new Ke.Range(t,a),a;this.items.push(e),a=Ke.Node.normalizeOffset(r,e.range.end)}}a=Ke.Node.endOfWhiteSpace(r,a),i=r[a]}return this.valueRange=new Ke.Range(t,a+1),i&&(this.items.push({char:i,offset:a}),a=Ke.Node.endOfWhiteSpace(r,a+1),a=this.parseComment(a)),a}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach(n=>{if(n instanceof Ke.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:r}=this;if(null!=r)return r;const o=t.filter(e=>e instanceof Ke.Node);let s="",i=n.start;return o.forEach(t=>{const n=e.slice(i,t.range.start);i=t.range.end,s+=n+String(t),"\n"===s[s.length-1]&&"\n"!==e[i-1]&&"\n"===e[i]&&(i+=1)}),s+=e.slice(i,n.end),Ke.Node.addStringTerminator(e,n.end,s)}}class st extends Ke.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:r,src:o}=this.context;'"'!==o[n-1]&&e.push(new Ke.YAMLSyntaxError(this,'Missing closing "quote'));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){Ke.Node.atDocumentBoundary(o,i+1)&&e.push(new Ke.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Ke.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new Ke.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(i+=1,o[i]){case"0":s+="\0";break;case"a":s+="";break;case"b":s+="\b";break;case"e":s+="";break;case"f":s+="\f";break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":s+="\t";break;case"v":s+="\v";break;case"N":s+="
";break;case"_":s+=" ";break;case"L":s+="\u2028";break;case"P":s+="\u2029";break;case" ":s+=" ";break;case'"':s+='"';break;case"/":s+="/";break;case"\\":s+="\\";break;case"\t":s+="\t";break;case"x":s+=this.parseCharCode(i+1,2,e),i+=2;break;case"u":s+=this.parseCharCode(i+1,4,e),i+=4;break;case"U":s+=this.parseCharCode(i+1,8,e),i+=8;break;case"\n":for(;" "===o[i+1]||"\t"===o[i+1];)i+=1;break;default:e.push(new Ke.YAMLSyntaxError(this,"Invalid escape sequence ".concat(o.substr(i-1,2)))),s+="\\"+o[i]}else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{errors:e,str:s}:s}parseCharCode(e,t,n){const{src:r}=this.context,o=r.substr(e,t),s=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(s)?(n.push(new Ke.YAMLSyntaxError(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(s)}parse(e,t){this.context=e;const{src:n}=e;let r=st.endOfQuote(n,t+1);return this.valueRange=new Ke.Range(t,r),r=Ke.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class it extends Ke.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:r,src:o}=this.context;"'"!==o[n-1]&&e.push(new Ke.YAMLSyntaxError(this,"Missing closing 'quote"));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){Ke.Node.atDocumentBoundary(o,i+1)&&e.push(new Ke.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Ke.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new Ke.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)s+=t,i+=1,"'"!==o[i]&&e.push(new Ke.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{errors:e,str:s}:s}parse(e,t){this.context=e;const{src:n}=e;let r=it.endOfQuote(n,t+1);return this.valueRange=new Ke.Range(t,r),r=Ke.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class at{static parseType(e,t,n){switch(e[t]){case"*":return Ke.Type.ALIAS;case">":return Ke.Type.BLOCK_FOLDED;case"|":return Ke.Type.BLOCK_LITERAL;case"{":return Ke.Type.FLOW_MAP;case"[":return Ke.Type.FLOW_SEQ;case"?":return!n&&Ke.Node.atBlank(e,t+1,!0)?Ke.Type.MAP_KEY:Ke.Type.PLAIN;case":":return!n&&Ke.Node.atBlank(e,t+1,!0)?Ke.Type.MAP_VALUE:Ke.Type.PLAIN;case"-":return!n&&Ke.Node.atBlank(e,t+1,!0)?Ke.Type.SEQ_ITEM:Ke.Type.PLAIN;case'"':return Ke.Type.QUOTE_DOUBLE;case"'":return Ke.Type.QUOTE_SINGLE;default:return Ke.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:r,indent:o,lineStart:s,parent:i}={}){Ke._defineProperty(this,"parseNode",(e,t)=>{if(Ke.Node.atDocumentBoundary(this.src,t))return null;const n=new at(this,e),{props:r,type:o,valueStart:s}=n.parseProps(t),i=function(e,t){switch(e){case Ke.Type.ALIAS:return new Xe(e,t);case Ke.Type.BLOCK_FOLDED:case Ke.Type.BLOCK_LITERAL:return new rt(e,t);case Ke.Type.FLOW_MAP:case Ke.Type.FLOW_SEQ:return new ot(e,t);case Ke.Type.MAP_KEY:case Ke.Type.MAP_VALUE:case Ke.Type.SEQ_ITEM:return new Je(e,t);case Ke.Type.COMMENT:case Ke.Type.PLAIN:return new Ke.PlainValue(e,t);case Ke.Type.QUOTE_DOUBLE:return new st(e,t);case Ke.Type.QUOTE_SINGLE:return new it(e,t);default:return null}}(o,r);let a=i.parse(n,s);if(i.range=new Ke.Range(t,a),a<=t&&(i.error=new Error("Node#parse consumed no characters"),i.error.parseEnd=a,i.error.source=i,i.range.end=t+1),n.nodeStartsCollection(i)){i.error||n.atLineStart||n.parent.type!==Ke.Type.DOCUMENT||(i.error=new Ke.YAMLSyntaxError(i,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new He(i);return a=e.parse(new at(n),a),e.range=new Ke.Range(t,a),e}return i}),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=r?r:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=s?s:e.lineStart,this.parent=null!=i?i:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:r}=this;if(t||n)return!1;if(e instanceof Je)return!0;let o=e.range.end;return"\n"!==r[o]&&"\n"!==r[o-1]&&(o=Ke.Node.endOfWhiteSpace(r,o),":"===r[o])}parseProps(e){const{inFlow:t,parent:n,src:r}=this,o=[];let s=!1,i=r[e=this.atLineStart?Ke.Node.endOfIndent(r,e):Ke.Node.endOfWhiteSpace(r,e)];for(;i===Ke.Char.ANCHOR||i===Ke.Char.COMMENT||i===Ke.Char.TAG||"\n"===i;){if("\n"===i){const t=e+1,o=Ke.Node.endOfIndent(r,t),i=o-(t+this.indent),a=n.type===Ke.Type.SEQ_ITEM&&n.context.atLineStart;if(!Ke.Node.nextNodeIsIndented(r[o],i,!a))break;this.atLineStart=!0,this.lineStart=t,s=!1,e=o}else if(i===Ke.Char.COMMENT){const t=Ke.Node.endOfLine(r,e+1);o.push(new Ke.Range(e,t)),e=t}else{let t=Ke.Node.endOfIdentifier(r,e+1);i===Ke.Char.TAG&&","===r[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(r.slice(e+1,t+13))&&(t=Ke.Node.endOfIdentifier(r,t+5)),o.push(new Ke.Range(e,t)),s=!0,e=Ke.Node.endOfWhiteSpace(r,t)}i=r[e]}s&&":"===i&&Ke.Node.atBlank(r,e+1,!0)&&(e-=1);return{props:o,type:at.parseType(r,e,t),valueStart:e}}}var ct={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 Ze,o=new at({src:e});r=t.parse(o,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}};function ut(e,t,n){return n?-1===n.indexOf("\n")?"".concat(e," #").concat(n):"".concat(e,"\n")+n.replace(/^/gm,"".concat(t||"","#")):e}class lt{}function ft(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ft(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 o=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(o),o}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class ht extends lt{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:ft(this.value,e,t)}toString(){return String(this.value)}}function pt(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){const n=t[e],o=Number.isInteger(n)&&n>=0?[]:{};o[n]=r,r=o}return e.createNode(r,!1)}const dt=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class gt extends lt{constructor(e){super(),Ke._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(dt(e))this.add(t);else{const[n,...r]=e,o=this.get(n,!0);if(o instanceof gt)o.addIn(r,t);else{if(void 0!==o||!this.schema)throw new Error("Expected YAML collection at ".concat(n,". Remaining path: ").concat(r));this.set(n,pt(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof gt)return n.deleteIn(t);throw new Error("Expected YAML collection at ".concat(e,". Remaining path: ").concat(t))}getIn([e,...t],n){const r=this.get(e,!0);return 0===t.length?!n&&r instanceof ht?r.value:r:r instanceof gt?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 ht&&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 gt&&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 gt)r.setIn(t,n);else{if(void 0!==r||!this.schema)throw new Error("Expected YAML collection at ".concat(e,". Remaining path: ").concat(t));this.set(e,pt(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:r,itemIndent:o},s,i){const{indent:a,indentStep:c,stringify:u}=e,l=this.type===Ke.Type.FLOW_MAP||this.type===Ke.Type.FLOW_SEQ||e.inFlow;l&&(o+=c);const f=r&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:f,indent:o,inFlow:l,type:null});let h=!1,p=!1;const d=this.items.reduce((t,n,r)=>{let s;n&&(!h&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach(e=>{t.push({type:"comment",str:"#".concat(e)})}),n.comment&&(s=n.comment),l&&(!h&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(p=!0)),h=!1;let i=u(n,e,()=>s=null,()=>h=!0);return l&&!p&&i.includes("\n")&&(p=!0),l&&r<this.items.length-1&&(i+=","),i=ut(i,o,s),h&&(s||l)&&(h=!1),t.push({type:"item",str:i}),t},[]);let g;if(0===d.length)g=n.start+n.end;else if(l){const{start:e,end:t}=n,r=d.map(e=>e.str);if(p||r.reduce((e,t)=>e+t.length+2,2)>gt.maxFlowStringSingleLineLength){g=e;for(const e of r)g+=e?"\n".concat(c).concat(a).concat(e):"\n";g+="\n".concat(a).concat(t)}else g="".concat(e," ").concat(r.join(" ")," ").concat(t)}else{const e=d.map(t);g=e.shift();for(const t of e)g+=t?"\n".concat(a).concat(t):"\n"}return this.comment?(g+="\n"+this.comment.replace(/^/gm,"".concat(a,"#")),s&&s()):h&&i&&i(),g}}function mt(e){let t=e instanceof ht?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}Ke._defineProperty(gt,"maxFlowStringSingleLineLength",60);class yt extends gt{add(e){this.items.push(e)}delete(e){const t=mt(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=mt(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof ht?r.value:r}has(e){const t=mt(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=mt(e);if("number"!=typeof n)throw new Error("Expected a valid index, not ".concat(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(ft(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:"- ".concat(e.str),flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}class vt extends lt{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=vt.Type.PAIR}get commentBefore(){return this.key instanceof lt?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new ht(null)),!(this.key instanceof lt)){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=ft(this.key,"",e);if(t instanceof Map){const r=ft(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 lt&&n&&n.doc?e.toString({anchors:{},doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e);t[r]=ft(this.value,r,e)}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:r,indentSeq:o,simpleKeys:s}=e.doc.options;let{key:i,value:a}=this,c=i instanceof lt&&i.comment;if(s){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(i instanceof gt){throw new Error("With simple keys, collection cannot be used as a key value")}}const u=!s&&(!i||c||i instanceof gt||i.type===Ke.Type.BLOCK_FOLDED||i.type===Ke.Type.BLOCK_LITERAL),{doc:l,indent:f,indentStep:h,stringify:p}=e;e=Object.assign({},e,{implicitKey:!u,indent:f+h});let d=!1,g=p(i,e,()=>c=null,()=>d=!0);if(g=ut(g,e.indent,c),e.allNullValues&&!s)return this.comment?(g=ut(g,e.indent,this.comment),t&&t()):d&&!c&&n&&n(),e.inFlow?g:"? ".concat(g);g=u?"? ".concat(g,"\n").concat(f,":"):"".concat(g,":"),this.comment&&(g=ut(g,e.indent,this.comment),t&&t());let m="",y=null;if(a instanceof lt){if(a.spaceBefore&&(m="\n"),a.commentBefore){const t=a.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));m+="\n".concat(t)}y=a.comment}else a&&"object"==typeof a&&(a=l.schema.createNode(a,!0));e.implicitKey=!1,!u&&!this.comment&&a instanceof ht&&(e.indentAtStart=g.length+1),d=!1,!o&&r>=2&&!e.inFlow&&!u&&a instanceof yt&&a.type!==Ke.Type.FLOW_SEQ&&!a.tag&&!l.anchors.getName(a)&&(e.indent=e.indent.substr(2));const v=p(a,e,()=>y=null,()=>d=!0);let _=" ";if(m||this.comment)_="".concat(m,"\n").concat(e.indent);else if(!u&&a instanceof gt){("["===v[0]||"{"===v[0])&&!v.includes("\n")||(_="\n".concat(e.indent))}return d&&!y&&n&&n(),ut(g+_+v,e.indent,y)}}Ke._defineProperty(vt,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const _t=(e,t)=>{if(e instanceof wt){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof gt){let n=0;for(const r of e.items){const e=_t(r,t);e>n&&(n=e)}return n}if(e instanceof vt){const n=_t(e.key,t),r=_t(e.value,t);return Math.max(n,r)}return 1};class wt extends lt{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:o,inStringifyKey:s}){let i=Object.keys(n).find(e=>n[e]===t);if(!i&&s&&(i=r.anchors.getName(t)||r.anchors.newName()),i)return"*".concat(i).concat(o?" ":"");const a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(a," [").concat(e,"]"))}constructor(e){super(),this.source=e,this.type=Ke.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return ft(this.source,e,t);const{anchors:n,maxAliasCount:r}=t,o=n.get(this.source);if(!o||void 0===o.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new Ke.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=_t(this.source,n)),o.count*o.aliasCount>r)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new Ke.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return o.res}toString(e){return wt.stringify(this,e)}}function Et(e,t){const n=t instanceof ht?t.value:t;for(const r of e)if(r instanceof vt){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}Ke._defineProperty(wt,"default",!0);class bt extends gt{add(e,t){e?e instanceof vt||(e=new vt(e.key||e,e.value)):e=new vt(e);const n=Et(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(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=Et(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=Et(this.items,e),r=n&&n.value;return!t&&r instanceof ht?r.value:r}has(e){return!!Et(this.items,e)}set(e,t){this.add(new vt(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 vt))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(e)," instead"));return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}class St extends vt{constructor(e){if(e instanceof vt){let t=e.value;t instanceof yt||(t=new yt,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new ht("<<"),new yt);this.type=vt.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof bt))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)||(t[e]=n)}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 At={defaultType:Ke.Type.BLOCK_LITERAL,lineWidth:76},Mt={defaultType:Ke.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Ot(e,t,n){for(const{format:n,test:r,resolve:o}of t)if(r){const t=e.match(r);if(t){let e=o.apply(null,t);return e instanceof ht||(e=new ht(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new ht(e)}const Lt=(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 Nt(e,t,n,{indentAtStart:r,lineWidth:o=80,minContentWidth:s=20,onFold:i,onOverflow:a}){if(!o||o<0)return e;const c=Math.max(1+s,1+o-t.length);if(e.length<=c)return e;const u=[],l={};let f,h=o-("number"==typeof r?r:t.length),p=void 0,d=void 0,g=!1,m=-1;for("block"===n&&(m=Lt(e,m),-1!==m&&(h=m+c));f=e[m+=1];){if("quoted"===n&&"\\"===f)switch(e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}if("\n"===f)"block"===n&&(m=Lt(e,m)),h=m+c,p=void 0;else{if(" "===f&&d&&" "!==d&&"\n"!==d&&"\t"!==d){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=m)}if(m>=h)if(p)u.push(p),h=p+c,p=void 0;else if("quoted"===n){for(;" "===d||"\t"===d;)d=f,f=e[m+=1],g=!0;u.push(m-2),l[m-2]=!0,h=m-2+c,p=void 0}else g=!0}d=f}if(g&&a&&a(),0===u.length)return e;i&&i();let y=e.slice(0,u[0]);for(let r=0;r<u.length;++r){const o=u[r],s=u[r+1]||e.length;"quoted"===n&&l[o]&&(y+="".concat(e[o],"\\")),y+="\n".concat(t).concat(e.slice(o+1,s))}return y}const Tt=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},Mt.fold):Mt.fold,Ct=e=>/^(%|---|\.\.\.)/m.test(e);function xt(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:o}=Mt.doubleQuoted,s=JSON.stringify(e);if(r)return s;const i=t.indent||(Ct(e)?" ":"");let a="",c=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(a+=s.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{a+=s.slice(c,e);const t=s.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+=s.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<o)e+=1;else{for(a+=s.slice(c,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)a+="\n",e+=2;a+=i," "===s[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+s.slice(c):s,n?a:Nt(a,i,"quoted",Tt(t))}function Pt(e,t){if(t.implicitKey){if(/\n/.test(e))return xt(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return xt(e,t);const n=t.indent||(Ct(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,"$&\n".concat(n))+"'";return t.implicitKey?r:Nt(r,n,"flow",Tt(t))}function Rt({comment:e,type:t,value:n},r,o,s){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return xt(n,r);const i=r.indent||(r.forceBlockIndent||Ct(n)?" ":""),a=i?"2":"1",c=t!==Ke.Type.BLOCK_FOLDED&&(t===Ke.Type.BLOCK_LITERAL||!function(e,t){const n=e.length;if(n<=t)return!1;for(let r=0,o=0;r<n;++r)if("\n"===e[r]){if(r-o>t)return!0;if(o=r+1,n-o<=t)return!1}return!0}(n,Mt.fold.lineWidth-i.length));let u=c?"|":">";if(!n)return u+"\n";let l="",f="";if(n=n.replace(/[\n\t ]*$/,e=>{const t=e.indexOf("\n");return-1===t?u+="-":n!==e&&t===e.length-1||(u+="+",s&&s()),f=e.replace(/\n$/,""),""}).replace(/^[\n ]*/,e=>{-1!==e.indexOf(" ")&&(u+=a);const t=e.match(/ +$/);return t?(l=e.slice(0,-t[0].length),t[0]):(l=e,"")}),f&&(f=f.replace(/\n+(?!\n|$)/g,"$&".concat(i))),l&&(l=l.replace(/\n+/g,"$&".concat(i))),e&&(u+=" #"+e.replace(/ ?[\r\n]+/g," "),o&&o()),!n)return"".concat(u).concat(a,"\n").concat(i).concat(f);if(c)return n=n.replace(/\n+/g,"$&".concat(i)),"".concat(u,"\n").concat(i).concat(l).concat(n).concat(f);n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(i));const h=Nt("".concat(l).concat(n).concat(f),i,"block",Mt.fold);return"".concat(u,"\n").concat(i).concat(h)}function It(e,t){let n,r,o;switch(t.type){case Ke.Type.FLOW_MAP:n="}",r="flow map";break;case Ke.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:return void e.push(new Ke.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!==Ke.Type.COMMENT){o=n;break}}if(o&&o.char!==n){const s="Expected ".concat(r," to end with ").concat(n);let i;"number"==typeof o.offset?(i=new Ke.YAMLSemanticError(t,s),i.offset=o.offset+1):(i=new Ke.YAMLSemanticError(o,s),o.range&&o.range.end&&(i.offset=o.range.end-o.range.start)),e.push(i)}}function kt(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 Ke.YAMLSemanticError(t,n))}}function Bt(e,t){const n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Ke.YAMLSemanticError(e,'The "'.concat(r,'" key is too long'))}function Yt(e,t){for(const{afterKey:n,before:r,comment:o}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===o?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+o:t.commentBefore=o):void 0!==o&&(e.comment?e.comment+="\n"+o:e.comment=o)}}function Dt(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 Ut(e,t){const{tag:n,type:r}=t;let o=!1;if(n){const{handle:r,suffix:s,verbatim:i}=n;if(i){if("!"!==i&&"!!"!==i)return i;const n="Verbatim tags aren't resolved, so ".concat(i," is invalid.");e.errors.push(new Ke.YAMLSemanticError(t,n))}else if("!"!==r||s)try{return function(e,t){const{handle:n,suffix:r}=t.tag;let o=e.tagPrefixes.find(e=>e.handle===n);if(!o){const r=e.getDefaults().tagPrefixes;if(r&&(o=r.find(e=>e.handle===n)),!o)throw new Ke.YAMLSemanticError(t,"The ".concat(n," tag handle is non-default and was not declared."))}if(!r)throw new Ke.YAMLSemanticError(t,"The ".concat(n," tag has no suffix."));if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===r[0])return e.warnings.push(new Ke.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){const e=r.match(/^([a-z0-9-]+)\/(.*)/i);return e?"tag:".concat(e[1],".yaml.org,2002:").concat(e[2]):"tag:".concat(r)}}return o.prefix+decodeURIComponent(r)}(e,t)}catch(t){e.errors.push(t)}else o=!0}switch(r){case Ke.Type.BLOCK_FOLDED:case Ke.Type.BLOCK_LITERAL:case Ke.Type.QUOTE_DOUBLE:case Ke.Type.QUOTE_SINGLE:return Ke.defaultTags.STR;case Ke.Type.FLOW_MAP:case Ke.Type.MAP:return Ke.defaultTags.MAP;case Ke.Type.FLOW_SEQ:case Ke.Type.SEQ:return Ke.defaultTags.SEQ;case Ke.Type.PLAIN:return o?Ke.defaultTags.STR:null;default:return null}}function Ft(e,t,n){const{tags:r}=e.schema,o=[];for(const s of r)if(s.tag===n){if(!s.test){const n=s.resolve(e,t);return n instanceof gt?n:new ht(n)}o.push(s)}const s=Dt(e,t);return"string"==typeof s&&o.length>0?Ot(s,o,r.scalarFallback):null}function jt(e,t,n){try{const r=Ft(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 r=function({type:e}){switch(e){case Ke.Type.FLOW_MAP:case Ke.Type.MAP:return Ke.defaultTags.MAP;case Ke.Type.FLOW_SEQ:case Ke.Type.SEQ:return Ke.defaultTags.SEQ;default:return Ke.defaultTags.STR}}(t);if(!r)throw new Error("The tag ".concat(n," is unavailable"));const o="The tag ".concat(n," is unavailable, falling back to ").concat(r);e.warnings.push(new Ke.YAMLWarning(t,o));const s=Ft(e,t,r);return s.tag=n,s}catch(n){const r=new Ke.YAMLReferenceError(t,n.message);return r.stack=n.stack,e.errors.push(r),null}}function Wt(e,t){const n={before:[],after:[]};let r=!1,o=!1;const s=(e=>{if(!e)return!1;const{type:t}=e;return t===Ke.Type.MAP_KEY||t===Ke.Type.MAP_VALUE||t===Ke.Type.SEQ_ITEM})(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:i,end:a}of s)switch(t.context.src[i]){case Ke.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(i)){const n="Comments must be separated from other tokens by white space characters";e.push(new Ke.YAMLSemanticError(t,n))}const{header:r,valueRange:o}=t;(o&&(i>o.start||r&&i>r.start)?n.after:n.before).push(t.context.src.slice(i+1,a));break}case Ke.Char.ANCHOR:if(r){const n="A node can have at most one anchor";e.push(new Ke.YAMLSemanticError(t,n))}r=!0;break;case Ke.Char.TAG:if(o){const n="A node can have at most one tag";e.push(new Ke.YAMLSemanticError(t,n))}o=!0}return{comments:n,hasAnchor:r,hasTag:o}}function Qt(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:r,hasTag:o}=Wt(e.errors,t);if(r){const{anchors:n}=e,r=t.anchor,o=n.getNode(r);o&&(n.map[n.newName(r)]=o),n.map[r]=t}if(t.type===Ke.Type.ALIAS&&(r||o)){const n="An alias node must not specify any properties";e.errors.push(new Ke.YAMLSemanticError(t,n))}const s=function(e,t){const{anchors:n,errors:r,schema:o}=e;if(t.type===Ke.Type.ALIAS){const e=t.rawValue,o=n.getNode(e);if(!o){const n="Aliased anchor not found: ".concat(e);return r.push(new Ke.YAMLReferenceError(t,n)),null}const s=new wt(o);return n._cstAliases.push(s),s}const s=Ut(e,t);if(s)return jt(e,t,s);if(t.type!==Ke.Type.PLAIN){const e="Failed to resolve ".concat(t.type," node here");return r.push(new Ke.YAMLSyntaxError(t,e)),null}try{return Ot(Dt(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(s){s.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(s.cstNode=t),e.options.keepNodeTypes&&(s.type=t.type);const r=n.before.join("\n");r&&(s.commentBefore=s.commentBefore?"".concat(s.commentBefore,"\n").concat(r):r);const o=n.after.join("\n");o&&(s.comment=s.comment?"".concat(s.comment,"\n").concat(o):o)}return t.resolved=s}function Vt(e,t){if(!(({context:{lineStart:e,node:t,src:n},props:r})=>{if(0===r.length)return!1;const{start:o}=r[0];if(t&&o>t.valueRange.start)return!1;if(n[o]!==Ke.Char.COMMENT)return!1;for(let t=e;t<o;++t)if("\n"===n[t])return!1;return!0})(e))return;const n=e.getPropValue(0,Ke.Char.COMMENT,!0);let r=!1;const o=t.value.commentBefore;if(o&&o.startsWith(n))t.value.commentBefore=o.substr(n.length+1),r=!0;else{const o=t.value.comment;!e.node&&o&&o.startsWith(n)&&(t.value.comment=o.substr(n.length+1),r=!0)}r&&(t.comment=n)}var Kt={Alias:wt,Collection:gt,Merge:St,Node:lt,Pair:vt,Scalar:ht,YAMLMap:bt,YAMLSeq:yt,addComment:ut,binaryOptions:At,boolOptions:{trueStr:"true",falseStr:"false"},findPair:Et,intOptions:{asBigInt:!1},isEmptyPath:dt,nullOptions:{nullStr:"null"},resolveMap:function(e,t){if(t.type!==Ke.Type.MAP&&t.type!==Ke.Type.FLOW_MAP){const n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new Ke.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===Ke.Type.FLOW_MAP?function(e,t){const n=[],r=[];let o=void 0,s=!1,i="{";for(let a=0;a<t.items.length;++a){const c=t.items[a];if("string"==typeof c.char){const{char:n,offset:u}=c;if("?"===n&&void 0===o&&!s){s=!0,i=":";continue}if(":"===n){if(void 0===o&&(o=null),":"===i){i=",";continue}}else if(s&&(void 0===o&&","!==n&&(o=null),s=!1),void 0!==o&&(r.push(new vt(o)),o=void 0,","===n)){i=":";continue}if("}"===n){if(a===t.items.length-1)continue}else if(n===i){i=":";continue}const l="Flow map contains an unexpected ".concat(n),f=new Ke.YAMLSyntaxError(t,l);f.offset=u,e.errors.push(f)}else c.type===Ke.Type.BLANK_LINE?n.push({afterKey:!!o,before:r.length}):c.type===Ke.Type.COMMENT?(kt(e.errors,c),n.push({afterKey:!!o,before:r.length,comment:c.comment})):void 0===o?(","===i&&e.errors.push(new Ke.YAMLSemanticError(c,"Separator , missing in flow map")),o=Qt(e,c)):(","!==i&&e.errors.push(new Ke.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new vt(o,Qt(e,c))),o=void 0,s=!1)}It(e.errors,t),void 0!==o&&r.push(new vt(o));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];let o=void 0,s=null;for(let i=0;i<t.items.length;++i){const a=t.items[i];switch(a.type){case Ke.Type.BLANK_LINE:n.push({afterKey:!!o,before:r.length});break;case Ke.Type.COMMENT:n.push({afterKey:!!o,before:r.length,comment:a.comment});break;case Ke.Type.MAP_KEY:void 0!==o&&r.push(new vt(o)),a.error&&e.errors.push(a.error),o=Qt(e,a.node),s=null;break;case Ke.Type.MAP_VALUE:{if(void 0===o&&(o=null),a.error&&e.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===Ke.Type.MAP&&!a.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new Ke.YAMLSemanticError(a.node,t))}let n=a.node;if(!n&&a.props.length>0){n=new Ke.PlainValue(Ke.Type.PLAIN,[]),n.context={parent:a,src:a.context.src};const e=a.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof a.range.origStart){const e=a.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const i=new vt(o,Qt(e,n));Vt(a,i),r.push(i),o&&"number"==typeof s&&a.range.start>s+1024&&e.errors.push(Bt(t,o)),o=void 0,s=null}break;default:void 0!==o&&r.push(new vt(o)),o=Qt(e,a),s=a.range.start,a.error&&e.errors.push(a.error);e:for(let n=i+1;;++n){const r=t.items[n];switch(r&&r.type){case Ke.Type.BLANK_LINE:case Ke.Type.COMMENT:continue e;case Ke.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new Ke.YAMLSemanticError(a,t));break e}}}if(a.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new Ke.YAMLSemanticError(a,t))}}}void 0!==o&&r.push(new vt(o));return{comments:n,items:r}}(e,t),o=new bt;o.items=r,Yt(o,n);let s=!1;for(let n=0;n<r.length;++n){const{key:o}=r[n];if(o instanceof gt&&(s=!0),e.schema.merge&&o&&"<<"===o.value){r[n]=new St(r[n]);const o=r[n].value.items;let s=null;o.some(e=>{if(e instanceof wt){const{type:t}=e.source;return t!==Ke.Type.MAP&&t!==Ke.Type.FLOW_MAP&&(s="Merge nodes aliases can only point to maps")}return s="Merge nodes can only have Alias nodes as values"}),s&&e.errors.push(new Ke.YAMLSemanticError(t,s))}else for(let s=n+1;s<r.length;++s){const{key:n}=r[s];if(o===n||o&&n&&Object.prototype.hasOwnProperty.call(o,"value")&&o.value===n.value){const n='Map keys must be unique; "'.concat(o,'" is repeated');e.errors.push(new Ke.YAMLSemanticError(t,n));break}}}if(s&&!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 Ke.YAMLWarning(t,n))}return t.resolved=o,o},resolveNode:Qt,resolveSeq:function(e,t){if(t.type!==Ke.Type.SEQ&&t.type!==Ke.Type.FLOW_SEQ){const n="A ".concat(t.type," node cannot be resolved as a sequence");return e.errors.push(new Ke.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===Ke.Type.FLOW_SEQ?function(e,t){const n=[],r=[];let o=!1,s=void 0,i=null,a="[",c=null;for(let u=0;u<t.items.length;++u){const l=t.items[u];if("string"==typeof l.char){const{char:n,offset:f}=l;if(":"===n||!o&&void 0===s||(o&&void 0===s&&(s=a?r.pop():null),r.push(new vt(s)),o=!1,s=void 0,i=null),n===a)a=null;else if(a||"?"!==n){if("["!==a&&":"===n&&void 0===s){if(","===a){if(s=r.pop(),s instanceof vt){const n="Chaining flow sequence pairs is invalid",r=new Ke.YAMLSemanticError(t,n);r.offset=f,e.errors.push(r)}if(!o&&"number"==typeof i){const n=l.range?l.range.start:l.offset;n>i+1024&&e.errors.push(Bt(t,s));const{src:r}=c.context;for(let t=i;t<n;++t)if("\n"===r[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new Ke.YAMLSemanticError(c,t));break}}}else s=null;i=null,o=!1,a=null}else if("["===a||"]"!==n||u<t.items.length-1){const r="Flow sequence contains an unexpected ".concat(n),o=new Ke.YAMLSyntaxError(t,r);o.offset=f,e.errors.push(o)}}else o=!0}else if(l.type===Ke.Type.BLANK_LINE)n.push({before:r.length});else if(l.type===Ke.Type.COMMENT)kt(e.errors,l),n.push({comment:l.comment,before:r.length});else{if(a){const t="Expected a ".concat(a," in flow sequence");e.errors.push(new Ke.YAMLSemanticError(l,t))}const t=Qt(e,l);void 0===s?(r.push(t),c=l):(r.push(new vt(s,t)),s=void 0),i=l.range.start,a=","}}It(e.errors,t),void 0!==s&&r.push(new vt(s));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];for(let o=0;o<t.items.length;++o){const s=t.items[o];switch(s.type){case Ke.Type.BLANK_LINE:n.push({before:r.length});break;case Ke.Type.COMMENT:n.push({comment:s.comment,before:r.length});break;case Ke.Type.SEQ_ITEM:if(s.error&&e.errors.push(s.error),r.push(Qt(e,s.node)),s.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new Ke.YAMLSemanticError(s,t))}break;default:s.error&&e.errors.push(s.error),e.errors.push(new Ke.YAMLSyntaxError(s,"Unexpected ".concat(s.type," node in sequence")))}}return{comments:n,items:r}}(e,t),o=new yt;if(o.items=r,Yt(o,n),!e.options.mapAsMap&&r.some(e=>e instanceof vt&&e.key instanceof gt)){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 Ke.YAMLWarning(t,n))}return t.resolved=o,o},resolveString:Dt,strOptions:Mt,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 o=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o},stringifyString:function(e,t,n,r){const{defaultType:o}=Mt,{implicitKey:s,inFlow:i}=t;let{type:a,value:c}=e;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));const u=o=>{switch(o){case Ke.Type.BLOCK_FOLDED:case Ke.Type.BLOCK_LITERAL:return Rt(e,t,n,r);case Ke.Type.QUOTE_DOUBLE:return xt(c,t);case Ke.Type.QUOTE_SINGLE:return Pt(c,t);case Ke.Type.PLAIN:return function(e,t,n,r){const{comment:o,type:s,value:i}=e,{actualString:a,implicitKey:c,indent:u,inFlow:l}=t;if(c&&/[\n[\]{},]/.test(i)||l&&/[[\]{},]/.test(i))return xt(i,t);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return c||l||-1===i.indexOf("\n")?-1!==i.indexOf('"')&&-1===i.indexOf("'")?Pt(i,t):xt(i,t):Rt(e,t,n,r);if(!c&&!l&&s!==Ke.Type.PLAIN&&-1!==i.indexOf("\n"))return Rt(e,t,n,r);if(""===u&&Ct(i))return t.forceBlockIndent=!0,Rt(e,t,n,r);const f=i.replace(/\n+/g,"$&\n".concat(u));if(a){const{tags:e}=t.doc.schema;if("string"!=typeof Ot(f,e,e.scalarFallback).value)return xt(i,t)}const h=c?f:Nt(f,u,"flow",Tt(t));return!o||l||-1===h.indexOf("\n")&&-1===o.indexOf("\n")?h:(n&&n(),function(e,t,n){if(!n)return e;const r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(h,u,o))}(e,t,n,r);default:return null}};a!==Ke.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?a=Ke.Type.QUOTE_DOUBLE:!s&&!i||a!==Ke.Type.BLOCK_FOLDED&&a!==Ke.Type.BLOCK_LITERAL||(a=Ke.Type.QUOTE_DOUBLE);let l=u(a);if(null===l&&(l=u(o),null===l))throw new Error("Unsupported default string type ".concat(o));return l},toJSON:ft},qt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Jt=[],$t=[],Gt="undefined"!=typeof Uint8Array?Uint8Array:Array,Ht=!1;function zt(){Ht=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)Jt[t]=e[t],$t[e.charCodeAt(t)]=t;$t["-".charCodeAt(0)]=62,$t["_".charCodeAt(0)]=63}function Zt(e,t,n){for(var r,o,s=[],i=t;i<n;i+=3)r=(e[i]<<16)+(e[i+1]<<8)+e[i+2],s.push(Jt[(o=r)>>18&63]+Jt[o>>12&63]+Jt[o>>6&63]+Jt[63&o]);return s.join("")}function Xt(e){var t;Ht||zt();for(var n=e.length,r=n%3,o="",s=[],i=0,a=n-r;i<a;i+=16383)s.push(Zt(e,i,i+16383>a?a:i+16383));return 1===r?(t=e[n-1],o+=Jt[t>>2],o+=Jt[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=Jt[t>>10],o+=Jt[t>>4&63],o+=Jt[t<<2&63],o+="="),s.push(o),s.join("")}function en(e,t,n,r,o){var s,i,a=8*o-r-1,c=(1<<a)-1,u=c>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,s=p&(1<<-l)-1,p>>=-l,l+=a;l>0;s=256*s+e[t+f],f+=h,l-=8);for(i=s&(1<<-l)-1,s>>=-l,l+=r;l>0;i=256*i+e[t+f],f+=h,l-=8);if(0===s)s=1-u;else{if(s===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,r),s-=u}return(p?-1:1)*i*Math.pow(2,s-r)}function tn(e,t,n,r,o,s){var i,a,c,u=8*s-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(i++,c/=2),i+f>=l?(a=0,i=l):i+f>=1?(a=(t*c-1)*Math.pow(2,o),i+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(i=i<<o|a,u+=o;u>0;e[n+p]=255&i,p+=d,i/=256,u-=8);e[n+p-d]|=128*g}var nn={}.toString,rn=Array.isArray||function(e){return"[object Array]"==nn.call(e)};function on(){return an.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function sn(e,t){if(on()<t)throw new RangeError("Invalid typed array length");return an.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=an.prototype:(null===e&&(e=new an(t)),e.length=t),e}function an(e,t,n){if(!(an.TYPED_ARRAY_SUPPORT||this instanceof an))return new an(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ln(this,e)}return cn(this,e,t,n)}function cn(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);an.TYPED_ARRAY_SUPPORT?(e=t).__proto__=an.prototype:e=fn(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!an.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|dn(t,n),o=(e=sn(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(pn(t)){var n=0|hn(t.length);return 0===(e=sn(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?sn(e,0):fn(e,t);if("Buffer"===t.type&&rn(t.data))return fn(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function un(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ln(e,t){if(un(t),e=sn(e,t<0?0:0|hn(t)),!an.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function fn(e,t){var n=t.length<0?0:0|hn(t.length);e=sn(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function hn(e){if(e>=on())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+on().toString(16)+" bytes");return 0|e}function pn(e){return!(null==e||!e._isBuffer)}function dn(e,t){if(pn(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Fn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return jn(e).length;default:if(r)return Fn(e).length;t=(""+t).toLowerCase(),r=!0}}function gn(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Tn(this,t,n);case"utf8":case"utf-8":return On(this,t,n);case"ascii":return Ln(this,t,n);case"latin1":case"binary":return Nn(this,t,n);case"base64":return Mn(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Cn(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function mn(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function yn(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=an.from(t,r)),pn(t))return 0===t.length?-1:vn(e,t,n,r,o);if("number"==typeof t)return t&=255,an.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):vn(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function vn(e,t,n,r,o){var s,i=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,a/=2,c/=2,n/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===c)return l*i}else-1!==l&&(s-=s-l),l=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){for(var f=!0,h=0;h<c;h++)if(u(e,s+h)!==u(t,h)){f=!1;break}if(f)return s}return-1}function _n(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var i=0;i<r;++i){var a=parseInt(t.substr(2*i,2),16);if(isNaN(a))return i;e[n+i]=a}return i}function wn(e,t,n,r){return Wn(Fn(t,e.length-n),e,n,r)}function En(e,t,n,r){return Wn(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function bn(e,t,n,r){return En(e,t,n,r)}function Sn(e,t,n,r){return Wn(jn(t),e,n,r)}function An(e,t,n,r){return Wn(function(e,t){for(var n,r,o,s=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o=n%256,s.push(o),s.push(r);return s}(t,e.length-n),e,n,r)}function Mn(e,t,n){return 0===t&&n===e.length?Xt(e):Xt(e.slice(t,n))}function On(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var s,i,a,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(s=e[o+1]))&&(c=(31&u)<<6|63&s)>127&&(l=c);break;case 3:s=e[o+1],i=e[o+2],128==(192&s)&&128==(192&i)&&(c=(15&u)<<12|(63&s)<<6|63&i)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:s=e[o+1],i=e[o+2],a=e[o+3],128==(192&s)&&128==(192&i)&&128==(192&a)&&(c=(15&u)<<18|(63&s)<<12|(63&i)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}an.TYPED_ARRAY_SUPPORT=void 0===qt.TYPED_ARRAY_SUPPORT||qt.TYPED_ARRAY_SUPPORT,an.poolSize=8192,an._augment=function(e){return e.__proto__=an.prototype,e},an.from=function(e,t,n){return cn(null,e,t,n)},an.TYPED_ARRAY_SUPPORT&&(an.prototype.__proto__=Uint8Array.prototype,an.__proto__=Uint8Array),an.alloc=function(e,t,n){return function(e,t,n,r){return un(t),t<=0?sn(e,t):void 0!==n?"string"==typeof r?sn(e,t).fill(n,r):sn(e,t).fill(n):sn(e,t)}(null,e,t,n)},an.allocUnsafe=function(e){return ln(null,e)},an.allocUnsafeSlow=function(e){return ln(null,e)},an.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Qn(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Qn(e.slice(0,0))}(e))},an.compare=function(e,t){if(!pn(e)||!pn(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,s=Math.min(n,r);o<s;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},an.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},an.concat=function(e,t){if(!rn(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return an.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=an.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!pn(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},an.byteLength=dn,an.prototype._isBuffer=!0,an.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)mn(this,t,t+1);return this},an.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)mn(this,t,t+3),mn(this,t+1,t+2);return this},an.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)mn(this,t,t+7),mn(this,t+1,t+6),mn(this,t+2,t+5),mn(this,t+3,t+4);return this},an.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?On(this,0,e):gn.apply(this,arguments)},an.prototype.equals=function(e){if(!pn(e))throw new TypeError("Argument must be a Buffer");return this===e||0===an.compare(this,e)},an.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},an.prototype.compare=function(e,t,n,r,o){if(!pn(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),a=Math.min(s,i),c=this.slice(r,o),u=e.slice(t,n),l=0;l<a;++l)if(c[l]!==u[l]){s=c[l],i=u[l];break}return s<i?-1:i<s?1:0},an.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},an.prototype.indexOf=function(e,t,n){return yn(this,e,t,n,!0)},an.prototype.lastIndexOf=function(e,t,n){return yn(this,e,t,n,!1)},an.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return _n(this,e,t,n);case"utf8":case"utf-8":return wn(this,e,t,n);case"ascii":return En(this,e,t,n);case"latin1":case"binary":return bn(this,e,t,n);case"base64":return Sn(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return An(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},an.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ln(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Nn(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Tn(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",s=t;s<n;++s)o+=Un(e[s]);return o}function Cn(e,t,n){for(var r=e.slice(t,n),o="",s=0;s<r.length;s+=2)o+=String.fromCharCode(r[s]+256*r[s+1]);return o}function xn(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Pn(e,t,n,r,o,s){if(!pn(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Rn(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,s=Math.min(e.length-n,2);o<s;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function In(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,s=Math.min(e.length-n,4);o<s;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function kn(e,t,n,r,o,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Bn(e,t,n,r,o){return o||kn(e,0,n,4),tn(e,t,n,r,23,4),n+4}function Yn(e,t,n,r,o){return o||kn(e,0,n,8),tn(e,t,n,r,52,8),n+8}an.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),an.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=an.prototype;else{var o=t-e;n=new an(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+e]}return n},an.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||xn(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r},an.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||xn(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},an.prototype.readUInt8=function(e,t){return t||xn(e,1,this.length),this[e]},an.prototype.readUInt16LE=function(e,t){return t||xn(e,2,this.length),this[e]|this[e+1]<<8},an.prototype.readUInt16BE=function(e,t){return t||xn(e,2,this.length),this[e]<<8|this[e+1]},an.prototype.readUInt32LE=function(e,t){return t||xn(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},an.prototype.readUInt32BE=function(e,t){return t||xn(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},an.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||xn(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},an.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||xn(e,t,this.length);for(var r=t,o=1,s=this[e+--r];r>0&&(o*=256);)s+=this[e+--r]*o;return s>=(o*=128)&&(s-=Math.pow(2,8*t)),s},an.prototype.readInt8=function(e,t){return t||xn(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},an.prototype.readInt16LE=function(e,t){t||xn(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},an.prototype.readInt16BE=function(e,t){t||xn(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},an.prototype.readInt32LE=function(e,t){return t||xn(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},an.prototype.readInt32BE=function(e,t){return t||xn(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},an.prototype.readFloatLE=function(e,t){return t||xn(e,4,this.length),en(this,e,!0,23,4)},an.prototype.readFloatBE=function(e,t){return t||xn(e,4,this.length),en(this,e,!1,23,4)},an.prototype.readDoubleLE=function(e,t){return t||xn(e,8,this.length),en(this,e,!0,52,8)},an.prototype.readDoubleBE=function(e,t){return t||xn(e,8,this.length),en(this,e,!1,52,8)},an.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Pn(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,s=0;for(this[t]=255&e;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},an.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Pn(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},an.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,1,255,0),an.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},an.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,2,65535,0),an.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Rn(this,e,t,!0),t+2},an.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,2,65535,0),an.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Rn(this,e,t,!1),t+2},an.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,4,4294967295,0),an.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):In(this,e,t,!0),t+4},an.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,4,4294967295,0),an.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):In(this,e,t,!1),t+4},an.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Pn(this,e,t,n,o-1,-o)}var s=0,i=1,a=0;for(this[t]=255&e;++s<n&&(i*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},an.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Pn(this,e,t,n,o-1,-o)}var s=n-1,i=1,a=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},an.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,1,127,-128),an.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},an.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,2,32767,-32768),an.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Rn(this,e,t,!0),t+2},an.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,2,32767,-32768),an.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Rn(this,e,t,!1),t+2},an.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,4,2147483647,-2147483648),an.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):In(this,e,t,!0),t+4},an.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Pn(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),an.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):In(this,e,t,!1),t+4},an.prototype.writeFloatLE=function(e,t,n){return Bn(this,e,t,!0,n)},an.prototype.writeFloatBE=function(e,t,n){return Bn(this,e,t,!1,n)},an.prototype.writeDoubleLE=function(e,t,n){return Yn(this,e,t,!0,n)},an.prototype.writeDoubleBE=function(e,t,n){return Yn(this,e,t,!1,n)},an.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,s=r-n;if(this===e&&n<t&&t<r)for(o=s-1;o>=0;--o)e[o+t]=this[o+n];else if(s<1e3||!an.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},an.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!an.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var i=pn(e)?e:Fn(new an(e,r).toString()),a=i.length;for(s=0;s<n-t;++s)this[s+t]=i[s%a]}return this};var Dn=/[^+\/0-9A-Za-z-_]/g;function Un(e){return e<16?"0"+e.toString(16):e.toString(16)}function Fn(e,t){var n;t=t||1/0;for(var r=e.length,o=null,s=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&s.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function jn(e){return function(e){var t,n,r,o,s,i;Ht||zt();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[a-2]?2:"="===e[a-1]?1:0,i=new Gt(3*a/4-s),r=s>0?a-4:a;var c=0;for(t=0,n=0;t<r;t+=4,n+=3)o=$t[e.charCodeAt(t)]<<18|$t[e.charCodeAt(t+1)]<<12|$t[e.charCodeAt(t+2)]<<6|$t[e.charCodeAt(t+3)],i[c++]=o>>16&255,i[c++]=o>>8&255,i[c++]=255&o;return 2===s?(o=$t[e.charCodeAt(t)]<<2|$t[e.charCodeAt(t+1)]>>4,i[c++]=255&o):1===s&&(o=$t[e.charCodeAt(t)]<<10|$t[e.charCodeAt(t+1)]<<4|$t[e.charCodeAt(t+2)]>>2,i[c++]=o>>8&255,i[c++]=255&o),i}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Dn,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Wn(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Qn(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Vn(){throw new Error("setTimeout has not been defined")}function Kn(){throw new Error("clearTimeout has not been defined")}var qn=Vn,Jn=Kn;function $n(e){if(qn===setTimeout)return setTimeout(e,0);if((qn===Vn||!qn)&&setTimeout)return qn=setTimeout,setTimeout(e,0);try{return qn(e,0)}catch(t){try{return qn.call(null,e,0)}catch(t){return qn.call(this,e,0)}}}"function"==typeof qt.setTimeout&&(qn=setTimeout),"function"==typeof qt.clearTimeout&&(Jn=clearTimeout);var Gn,Hn=[],zn=!1,Zn=-1;function Xn(){zn&&Gn&&(zn=!1,Gn.length?Hn=Gn.concat(Hn):Zn=-1,Hn.length&&er())}function er(){if(!zn){var e=$n(Xn);zn=!0;for(var t=Hn.length;t;){for(Gn=Hn,Hn=[];++Zn<t;)Gn&&Gn[Zn].run();Zn=-1,t=Hn.length}Gn=null,zn=!1,function(e){if(Jn===clearTimeout)return clearTimeout(e);if((Jn===Kn||!Jn)&&clearTimeout)return Jn=clearTimeout,clearTimeout(e);try{Jn(e)}catch(t){try{return Jn.call(null,e)}catch(t){return Jn.call(this,e)}}}(e)}}function tr(e,t){this.fun=e,this.array=t}tr.prototype.run=function(){this.fun.apply(null,this.array)};function nr(){}var rr=nr,or=nr,sr=nr,ir=nr,ar=nr,cr=nr,ur=nr;var lr=qt.performance||{},fr=lr.now||lr.mozNow||lr.msNow||lr.oNow||lr.webkitNow||function(){return(new Date).getTime()};var hr=new Date;var pr={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Hn.push(new tr(e,t)),1!==Hn.length||zn||$n(er)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:rr,addListener:or,once:sr,off:ir,removeListener:ar,removeAllListeners:cr,emit:ur,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*fr.call(lr),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-hr)/1e3}};const dr={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=Kt.resolveString(e,t);return an.from(n,"base64")},options:Kt.binaryOptions,stringify:({comment:e,type:t,value:n},r,o,s)=>{let i;if(i=n instanceof an?n.toString("base64"):an.from(n.buffer).toString("base64"),t||(t=Kt.binaryOptions.defaultType),t===Ke.Type.QUOTE_DOUBLE)n=i;else{const{lineWidth:e}=Kt.binaryOptions,r=Math.ceil(i.length/e),o=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)o[t]=i.substr(n,e);n=o.join(t===Ke.Type.BLOCK_LITERAL?"\n":" ")}return Kt.stringifyString({comment:e,type:t,value:n},r,o,s)}};function gr(e,t){const n=Kt.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let r=n.items[e];if(!(r instanceof Kt.Pair)){if(r instanceof Kt.YAMLMap){if(r.items.length>1){const e="Each pair must have its own sequence indicator";throw new Ke.YAMLSemanticError(t,e)}const e=r.items[0]||new Kt.Pair;r.commentBefore&&(e.commentBefore=e.commentBefore?"".concat(r.commentBefore,"\n").concat(e.commentBefore):r.commentBefore),r.comment&&(e.comment=e.comment?"".concat(r.comment,"\n").concat(e.comment):r.comment),r=e}n.items[e]=r instanceof Kt.Pair?r:new Kt.Pair(r)}}return n}function mr(e,t,n){const r=new Kt.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const o of t){let t,s;if(Array.isArray(o)){if(2!==o.length)throw new TypeError("Expected [key, value] tuple: ".concat(o));t=o[0],s=o[1]}else if(o&&o instanceof Object){const e=Object.keys(o);if(1!==e.length)throw new TypeError("Expected { key: value } tuple: ".concat(o));t=e[0],s=o[t]}else t=o;const i=e.createPair(t,s,n);r.items.push(i)}return r}const yr={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:gr,createNode:mr};class vr extends Kt.YAMLSeq{constructor(){super(),Ke._defineProperty(this,"add",Kt.YAMLMap.prototype.add.bind(this)),Ke._defineProperty(this,"delete",Kt.YAMLMap.prototype.delete.bind(this)),Ke._defineProperty(this,"get",Kt.YAMLMap.prototype.get.bind(this)),Ke._defineProperty(this,"has",Kt.YAMLMap.prototype.has.bind(this)),Ke._defineProperty(this,"set",Kt.YAMLMap.prototype.set.bind(this)),this.tag=vr.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,o;if(e instanceof Kt.Pair?(r=Kt.toJSON(e.key,"",t),o=Kt.toJSON(e.value,r,t)):r=Kt.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}}Ke._defineProperty(vr,"tag","tag:yaml.org,2002:omap");const _r={identify:e=>e instanceof Map,nodeClass:vr,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=gr(e,t),r=[];for(const{key:e}of n.items)if(e instanceof Kt.Scalar){if(r.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new Ke.YAMLSemanticError(t,e)}r.push(e.value)}return Object.assign(new vr,n)},createNode:function(e,t,n){const r=mr(e,t,n),o=new vr;return o.items=r.items,o}};class wr extends Kt.YAMLMap{constructor(){super(),this.tag=wr.tag}add(e){const t=e instanceof Kt.Pair?e:new Kt.Pair(e);Kt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=Kt.findPair(this.items,e);return!t&&n instanceof Kt.Pair?n.key instanceof Kt.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 ".concat(typeof t));const n=Kt.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Kt.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")}}Ke._defineProperty(wr,"tag","tag:yaml.org,2002:set");const Er={identify:e=>e instanceof Set,nodeClass:wr,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=Kt.resolveMap(e,t);if(!n.hasAllNullValues())throw new Ke.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new wr,n)},createNode:function(e,t,n){const r=new wr;for(const o of t)r.items.push(e.createPair(o,null,n));return r}},br=(e,t)=>{const n=t.split(":").reduce((e,t)=>60*e+Number(t),0);return"-"===e?-n:n},Sr=({value:e})=>{if(isNaN(e)||!isFinite(e))return Kt.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*$/,"")},Ar={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)=>br(t,n.replace(/_/g,"")),stringify:Sr},Mr={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)=>br(t,n.replace(/_/g,"")),stringify:Sr},Or={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,o,s,i,a,c)=>{a&&(a=(a+"00").substr(1,3));let u=Date.UTC(t,n-1,r,o||0,s||0,i||0,a||0);if(c&&"Z"!==c){let e=br(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 Lr(e){const t=void 0!==pr&&pr.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 Nr(e,t){if(Lr(!1)){const n=void 0!==pr&&pr.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}const Tr={};var Cr={binary:dr,floatTime:Mr,intTime:Ar,omap:_r,pairs:yr,set:Er,timestamp:Or,warn:Nr,warnFileDeprecation:function(e){if(Lr(!0)){const t=e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Nr("The endpoint 'yaml/".concat(t,"' will be removed in a future release."),"DeprecationWarning")}},warnOptionDeprecation:function(e,t){if(!Tr[e]&&Lr(!0)){Tr[e]=!0;let n="The option '".concat(e,"' will be removed in a future release");n+=t?", use '".concat(t,"' instead."):".",Nr(n,"DeprecationWarning")}}};const xr={createNode:function(e,t,n){const r=new Kt.YAMLMap(e);if(t instanceof Map)for(const[o,s]of t)r.items.push(e.createPair(o,s,n));else if(t&&"object"==typeof t)for(const o of Object.keys(t))r.items.push(e.createPair(o,t[o],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:Kt.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:Kt.resolveMap};const Pr={createNode:function(e,t,n){const r=new Kt.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const o of t){const t=e.createNode(o,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:Kt.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:Kt.resolveSeq},Rr={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:Kt.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),Kt.stringifyString(e,t,n,r)),options:Kt.strOptions},Ir=[xr,Pr,Rr],kr=e=>"bigint"==typeof e||Number.isInteger(e),Br=(e,t,n)=>Kt.intOptions.asBigInt?BigInt(e):parseInt(t,n);function Yr(e,t,n){const{value:r}=e;return kr(r)&&r>=0?n+r.toString(t):Kt.stringifyNumber(e)}const Dr={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Kt.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:Kt.nullOptions,stringify:()=>Kt.nullOptions.nullStr},Ur={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:Kt.boolOptions,stringify:({value:e})=>e?Kt.boolOptions.trueStr:Kt.boolOptions.falseStr},Fr={identify:e=>kr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>Br(e,t,8),options:Kt.intOptions,stringify:e=>Yr(e,8,"0o")},jr={identify:kr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>Br(e,e,10),options:Kt.intOptions,stringify:Kt.stringifyNumber},Wr={identify:e=>kr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>Br(e,t,16),options:Kt.intOptions,stringify:e=>Yr(e,16,"0x")},Qr={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:Kt.stringifyNumber},Vr={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()},Kr={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,o=new Kt.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(o.minFractionDigits=r.length),o},stringify:Kt.stringifyNumber},qr=Ir.concat([Dr,Ur,Fr,jr,Wr,Qr,Vr,Kr]),Jr=e=>"bigint"==typeof e||Number.isInteger(e),$r=({value:e})=>JSON.stringify(e),Gr=[xr,Pr,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:Kt.resolveString,stringify:$r},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Kt.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$r},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:$r},{identify:Jr,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>Kt.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>Jr(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:$r}];Gr.scalarFallback=e=>{throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};const Hr=({value:e})=>e?Kt.boolOptions.trueStr:Kt.boolOptions.falseStr,zr=e=>"bigint"==typeof e||Number.isInteger(e);function Zr(e,t,n){let r=t.replace(/_/g,"");if(Kt.intOptions.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}const t=BigInt(r);return"-"===e?BigInt(-1)*t:t}const o=parseInt(r,n);return"-"===e?-1*o:o}function Xr(e,t,n){const{value:r}=e;if(zr(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return Kt.stringifyNumber(e)}const eo=Ir.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Kt.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:Kt.nullOptions,stringify:()=>Kt.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:Kt.boolOptions,stringify:Hr},{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:Kt.boolOptions,stringify:Hr},{identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>Zr(t,n,2),stringify:e=>Xr(e,2,"0b")},{identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>Zr(t,n,8),stringify:e=>Xr(e,8,"0")},{identify:zr,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>Zr(t,n,10),stringify:Kt.stringifyNumber},{identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>Zr(t,n,16),stringify:e=>Xr(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:Kt.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 Kt.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:Kt.stringifyNumber}],Cr.binary,Cr.omap,Cr.pairs,Cr.set,Cr.intTime,Cr.floatTime,Cr.timestamp),to={core:qr,failsafe:Ir,json:Gr,yaml11:eo},no={binary:Cr.binary,bool:Ur,float:Kr,floatExp:Vr,floatNaN:Qr,floatTime:Cr.floatTime,int:jr,intHex:Wr,intOct:Fr,intTime:Cr.intTime,map:xr,null:Dr,omap:Cr.omap,pairs:Cr.pairs,seq:Pr,set:Cr.set,timestamp:Cr.timestamp};function ro(e,t,n){if(e instanceof Kt.Node)return e;const{defaultPrefix:r,onTagObj:o,prevObjects:s,schema:i,wrapScalars:a}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let c=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 ".concat(t," not found"));return r}return n.find(t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}(e,t,i.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),"object"!=typeof e)return a?new Kt.Scalar(e):e;c=e instanceof Map?xr:e[Symbol.iterator]?Pr:xr}o&&(o(c),delete n.onTagObj);const u={};if(e&&"object"==typeof e&&s){const t=s.get(e);if(t){const e=new Kt.Alias(t);return n.aliasNodes.push(e),e}u.value=e,s.set(e,u)}return u.node=c.createNode?c.createNode(n.schema,e,n):a?new Kt.Scalar(e):e,t&&u.node instanceof Kt.Node&&(u.node.tag=t),u.node}const oo=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class so{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:o}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?oo:r||null,!e&&o&&Cr.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let o=e[r.replace(/\W/g,"")];if(!o){const t=Object.keys(e).map(e=>JSON.stringify(e)).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(t))}if(Array.isArray(n))for(const e of n)o=o.concat(e);else"function"==typeof n&&(o=n(o.slice()));for(let e=0;e<o.length;++e){const n=o[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 "'.concat(n,'"; use one of ').concat(e))}o[e]=r}}return o}(to,no,e||o,n)}createNode(e,t,n,r){const o={defaultPrefix:so.defaultPrefix,schema:this,wrapScalars:t};return ro(e,n,r?Object.assign(r,o):o)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),o=this.createNode(t,n.wrapScalars,null,n);return new Kt.Pair(r,o)}}Ke._defineProperty(so,"defaultPrefix",Ke.defaultTagPrefix),Ke._defineProperty(so,"defaultTags",Ke.defaultTags);var io={Schema:so};const ao={get binary(){return Kt.binaryOptions},set binary(e){Object.assign(Kt.binaryOptions,e)},get bool(){return Kt.boolOptions},set bool(e){Object.assign(Kt.boolOptions,e)},get int(){return Kt.intOptions},set int(e){Object.assign(Kt.intOptions,e)},get null(){return Kt.nullOptions},set null(e){Object.assign(Kt.nullOptions,e)},get str(){return Kt.strOptions},set str(e){Object.assign(Kt.strOptions,e)}},co={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Ke.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Ke.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Ke.defaultTagPrefix}]}};function uo(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?"!".concat(n[1],"/").concat(n[2]):"!".concat(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:"!<".concat(t,">");const r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]));return n.handle+r}function lo(e,t,n,r){const{anchors:o,schema:s}=t.doc;let i;if(!(e instanceof Kt.Node)){const t={aliasNodes:[],onTagObj:e=>i=e,prevObjects:new Map};e=s.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=o.getName(e.source);t||(t=o.newName(),o.map[t]=e.source)}}if(e instanceof Kt.Pair)return e.toString(t,n,r);i||(i=function(e,t){if(t instanceof Kt.Alias)return Kt.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 Kt.Scalar){r=t.value;const o=e.filter(e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class);n=o.find(e=>e.format===t.format)||o.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 ".concat(e," value"))}return n}(s.tags,e));const a=function(e,t,{anchors:n,doc:r}){const o=[],s=r.anchors.getName(e);return s&&(n[s]=e,o.push("&".concat(s))),e.tag?o.push(uo(r,e.tag)):t.default||o.push(uo(r,t.tag)),o.join(" ")}(e,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart||0)+a.length+1);const c="function"==typeof i.stringify?i.stringify(e,t,n,r):e instanceof Kt.Scalar?Kt.stringifyString(e,t,n,r):e.toString(t,n,r);return a?e instanceof Kt.Scalar||"{"===c[0]||"["===c[0]?"".concat(a," ").concat(c):"".concat(a,"\n").concat(t.indent).concat(c):c}class fo{static validAnchorNode(e){return e instanceof Kt.Scalar||e instanceof Kt.YAMLSeq||e instanceof Kt.YAMLMap}constructor(e){Ke._defineProperty(this,"map",{}),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new Kt.Alias(e)}createMergePair(...e){const t=new Kt.Merge;return t.value.items=e.map(e=>{if(e instanceof Kt.Alias){if(e.source instanceof Kt.YAMLMap)return e}else if(e instanceof Kt.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="".concat(e).concat(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&&!fo.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 ho=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof Kt.Collection?(n&&(t[n]=!0),e.items.forEach(e=>ho(e,t))):e instanceof Kt.Pair?(ho(e.key,t),ho(e.value,t)):e instanceof Kt.Scalar&&n&&(t[n]=!0)}return t};function po({tagPrefixes:e},t){const[n,r]=t.parameters;if(!n||!r){const e="Insufficient parameters given for %TAG directive";throw new Ke.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 Ke.YAMLSemanticError(t,e)}return{handle:n,prefix:r}}function go(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 Ke.YAMLSemanticError(t,e)}if(!co[n]){const r=e.version||e.options.version,o="Document will be parsed as YAML ".concat(r," rather than YAML ").concat(n);e.warnings.push(new Ke.YAMLWarning(t,o))}return n}function mo(e){if(e instanceof Kt.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class yo{constructor(e){this.anchors=new fo(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 mo(this.contents),this.contents.add(e)}addIn(e,t){mo(this.contents),this.contents.addIn(e,t)}delete(e){return mo(this.contents),this.contents.delete(e)}deleteIn(e){return Kt.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(mo(this.contents),this.contents.deleteIn(e))}getDefaults(){return yo.defaults[this.version]||yo.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof Kt.Collection?this.contents.get(e,t):void 0}getIn(e,t){return Kt.isEmptyPath(e)?!t&&this.contents instanceof Kt.Scalar?this.contents.value:this.contents:this.contents instanceof Kt.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof Kt.Collection&&this.contents.has(e)}hasIn(e){return Kt.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof Kt.Collection&&this.contents.hasIn(e)}set(e,t){mo(this.contents),this.contents.set(e,t)}setIn(e,t){Kt.isEmptyPath(e)?this.contents=t:(mo(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 io.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:r=[],directivesEndMarker:o,error:s,valueRange:i}=e;if(s&&(s.source||(s.source=this),this.errors.push(s)),function(e,t,n){const r=[];let o=!1;for(const n of t){const{comment:t,name:s}=n;switch(s){case"TAG":try{e.tagPrefixes.push(po(e,n))}catch(t){e.errors.push(t)}o=!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 Ke.YAMLSemanticError(n,t))}try{e.version=go(e,n)}catch(t){e.errors.push(t)}o=!0;break;default:if(s){const t="YAML only supports %TAG and %YAML directives, and not %".concat(s);e.warnings.push(new Ke.YAMLWarning(n,t))}}t&&r.push(t)}if(n&&!o&&"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=r.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=i?[i.start,i.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let r=void 0,o=!1;for(const s of t)if(s.valueRange){if(void 0!==r){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new Ke.YAMLSyntaxError(s,t));break}const t=Kt.resolveNode(e,s);o&&(t.spaceBefore=!0,o=!1),r=t}else null!==s.comment?(void 0===r?n.before:n.after).push(s.comment):s.type===Ke.Type.BLANK_LINE&&(o=!0,void 0===r&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=r||null,r){const t=n.before.join("\n");if(t){const e=r instanceof Kt.Collection&&r.items[0]?r.items[0]:r;e.commentBefore=e.commentBefore?"".concat(t,"\n").concat(e.commentBefore):t}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,r),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof Ke.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof Ke.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=>Object.keys(ho(e,{})))(this.contents).filter(e=>0!==e.indexOf(io.Schema.defaultPrefix))}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:o}=this.options,s=n&&("string"!=typeof e||!(this.contents instanceof Kt.Scalar)),i={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!r,maxAliasCount:o,stringify:lo},a=Object.keys(this.anchors.map);a.length>0&&(i.anchors=new Map(a.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}])));const c=Kt.toJSON(this.contents,e,i);if("function"==typeof t&&i.anchors)for(const{count:e,res:n}of i.anchors.values())t(n,e);return c}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 '.concat(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:o})=>{r.some(e=>0===e.indexOf(o))&&(t.push("%TAG ".concat(e," ").concat(o)),n=!0)}),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const o={anchors:{},doc:this,indent:"",indentStep:" ".repeat(e),stringify:lo};let s=!1,i=null;if(this.contents){this.contents instanceof Kt.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment,i=this.contents.comment);const e=i?null:()=>s=!0,r=lo(this.contents,o,()=>i=null,e);t.push(Kt.addComment(r,"",i))}else void 0!==this.contents&&t.push(lo(this.contents,o));return this.comment&&(s&&!i||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}Ke._defineProperty(yo,"defaults",co);var vo={Document:yo,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"},scalarOptions:ao};class _o extends vo.Document{constructor(e){super(Object.assign({},vo.defaultOptions,e))}}function wo(e,t){const n=ct.parse(e),r=new _o(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ke.YAMLSemanticError(n[1],e))}return r}var Eo={YAML:{createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},vo.Document.defaults[vo.defaultOptions.version],vo.defaultOptions);return new io.Schema(r).createNode(e,t,n)},defaultOptions:vo.defaultOptions,Document:_o,parse:function(e,t){const n=wo(e,t);if(n.warnings.forEach(e=>Cr.warn(e)),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let r;for(const o of ct.parse(e)){const e=new _o(t);e.parse(o,r),n.push(e),r=e}return n},parseCST:ct.parse,parseDocument:wo,scalarOptions:vo.scalarOptions,stringify:function(e,t){const n=new _o(t);return n.contents=e,String(n)}}}.YAML,bo={Type:Ke.Type,YAMLError:Ke.YAMLError,YAMLReferenceError:Ke.YAMLReferenceError,YAMLSemanticError:Ke.YAMLSemanticError,YAMLSyntaxError:Ke.YAMLSyntaxError,YAMLWarning:Ke.YAMLWarning,findPair:Kt.findPair,parseMap:Kt.resolveMap,parseSeq:Kt.resolveSeq,stringifyNumber:Kt.stringifyNumber,stringifyString:Kt.stringifyString,toJSON:Kt.toJSON},So={findPair:bo.findPair,toJSON:bo.toJSON,parseMap:bo.parseMap,parseSeq:bo.parseSeq,stringifyNumber:bo.stringifyNumber,stringifyString:bo.stringifyString,Type:bo.Type,YAMLError:bo.YAMLError,YAMLReferenceError:bo.YAMLReferenceError,YAMLSemanticError:bo.YAMLSemanticError,YAMLSyntaxError:bo.YAMLSyntaxError,YAMLWarning:bo.YAMLWarning},Ao=n((function(e,t){t.__esModule=!0,t.Document=Eo.Document;var n=Eo;t.parseCST=n.parseCST,t.YAMLError=So.YAMLError,t.YAMLSyntaxError=So.YAMLSyntaxError,t.YAMLSemanticError=So.YAMLSemanticError})),Mo=n((function(e,t){t.__esModule=!0,t.parse=function(e){var t=Ao.parseCST(e);Ce.addOrigRange(t);for(var n=t.map((function(e){return new Ao.Document({merge:!1,keepCstNodes:!0}).parse(e)})),r=[],o={text:e,locator:new l.default(e),comments:r,transformOffset:function(e){return Ne.transformOffset(e,o)},transformRange:function(e){return Te.transformRange(e,o)},transformNode:function(e){return Ae.transformNode(e,o)},transformContent:function(e){return C.transformContent(e,o)}},s=0,i=n;s<i.length;s++)for(var a=0,c=i[s].errors;a<c.length;a++){var u=c[a];if(!(u instanceof Ao.YAMLSemanticError&&'Map keys must be unique; "<<" is repeated'===u.message))throw Oe.transformError(u,o)}n.forEach((function(e){return y.removeCstBlankLine(e.cstNode)}));var f=m.createRoot(o.transformRange({origStart:0,origEnd:o.text.length}),n.map(o.transformNode),r);return p.attachComments(f),Re.updatePositions(f),xe.removeFakeNodes(f),f}})),Oo=n((function(e,t){t.__esModule=!0,g.__exportStar(Mo,t)}));const{hasPragma:Lo}=t;return{parsers:{yaml:{astFormat:"yaml",parse:function(t){try{const e=Oo.parse(t);return delete e.comments,e}catch(t){if(t&&t.position)throw e(t.message,t.position);throw t}},hasPragma:Lo,locStart:e=>e.position.start.offset,locEnd:e=>e.position.end.offset}}}}));
|
|
15
|
+
***************************************************************************** */}var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i}function c(e){return this instanceof c?(this.v=e,this):new c(e)}var l=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return s},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},__decorate:function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:i,__read:a,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,o++)r[o]=s[i];return r},__await:c,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof c?Promise.resolve(n.value.v).then(l,u):f(s[0][2],n)}catch(e){f(s[0][3],e)}var n}function l(e){a("next",e)}function u(e){a("throw",e)}function f(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:c(e[r](t)),done:"return"===r}:o?o(t):t}:o}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=i(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),u=r((function(e,t){var n="\n",r=function(){function e(e){this.string=e;for(var t=[0],r=0;r<e.length;)switch(e[r]){case n:r+=n.length,t.push(r);break;case"\r":e[r+="\r".length]===n&&(r+=n.length),t.push(r);break;default:r++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=r}));var f=function e(t,n){void 0===n&&(n=null),"children"in t&&t.children.forEach((function(n){return e(n,t)})),"anchor"in t&&t.anchor&&e(t.anchor,t),"tag"in t&&t.tag&&e(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach((function(n){return e(n,t)})),"middleComments"in t&&t.middleComments.forEach((function(n){return e(n,t)})),"indicatorComment"in t&&t.indicatorComment&&e(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&e(t.trailingComment,t),"endComments"in t&&t.endComments.forEach((function(n){return e(n,t)})),Object.defineProperty(t,"_parent",{value:n,enumerable:!1})},h=Object.defineProperty({defineParents:f},"__esModule",{value:!0});var p=function(e){return e.line+":"+e.column},d=Object.defineProperty({getPointText:p},"__esModule",{value:!0});var g=function(e){h.defineParents(e);var t=function(e){for(var t=Array.from(new Array(e.position.end.line),(function(){return{}})),n=0,r=e.comments;n<r.length;n++){var o=r[n];t[o.position.start.line-1].comment=o}return m(t,e),t}(e),n=e.children.slice();e.comments.sort((function(e,t){return e.position.start.offset-t.position.end.offset})).filter((function(e){return!e._parent})).forEach((function(e){for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();!function(e,t,n){var r=e.position.start.line,o=t[r-1].trailingAttachableNode;if(o){if(o.trailingComment)throw new Error("Unexpected multiple trailing comment at "+d.getPointText(e.position.start));return h.defineParents(e,o),void(o.trailingComment=e)}for(var s=r;s>=n.position.start.line;s--){var i=t[s-1].trailingNode,a=void 0;if(i)a=i;else{if(s===r||!t[s-1].comment)continue;a=t[s-1].comment._parent}if("sequence"!==a.type&&"mapping"!==a.type||(a=a.children[0]),"mappingItem"===a.type){var c=a.children,l=c[0],u=c[1];a=v(l)?l:u}for(;;){if(y(a,e))return h.defineParents(e,a),void a.endComments.push(e);if(!a._parent)break;a=a._parent}break}for(s=r+1;s<=n.position.end.line;s++){var f=t[s-1].leadingAttachableNode;if(f)return h.defineParents(e,f),void f.leadingComments.push(e)}var p=n.children[1];h.defineParents(e,p),p.endComments.push(e)}(e,t,n[0])}))};function m(e,t){if(t.position.start.offset!==t.position.end.offset){if("leadingComments"in t){var n=t.position.start,r=e[n.line-1].leadingAttachableNode;(!r||n.column<r.position.start.column)&&(e[n.line-1].leadingAttachableNode=t)}if("trailingComment"in t&&t.position.end.column>1&&"document"!==t.type&&"documentHead"!==t.type){var o=t.position.end,s=e[o.line-1].trailingAttachableNode;(!s||o.column>=s.position.end.column)&&(e[o.line-1].trailingAttachableNode=t)}if("root"!==t.type&&"document"!==t.type&&"documentHead"!==t.type&&"documentBody"!==t.type)for(var i=t.position,a=(n=i.start,0),c=[(o=i.end).line].concat(n.line===o.line?[]:n.line);a<c.length;a++){var l=c[a],u=e[l-1].trailingNode;(!u||o.column>=u.position.end.column)&&(e[l-1].trailingNode=t)}"children"in t&&t.children.forEach((function(t){m(e,t)}))}}function y(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return 0===e.children.length||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case"sequenceItem":return t.position.start.column>e.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(0===e.children.length||1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type)&&("mappingValue"===e.type||v(e));default:return!1}}function v(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}var _=Object.defineProperty({attachComments:g},"__esModule",{value:!0});var w=function(e,t){return{type:e,position:t}},b=Object.defineProperty({createNode:w},"__esModule",{value:!0});var E=function(e,t,n){return l.__assign(l.__assign({},b.createNode("root",e)),{children:t,comments:n})},S=Object.defineProperty({createRoot:E},"__esModule",{value:!0});var O=function e(t){switch(t.type){case"DOCUMENT":for(var n=t.contents.length-1;n>=0;n--)"BLANK_LINE"===t.contents[n].type?t.contents.splice(n,1):e(t.contents[n]);for(n=t.directives.length-1;n>=0;n--)"BLANK_LINE"===t.directives[n].type&&t.directives.splice(n,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(n=t.items.length-1;n>=0;n--){var r=t.items[n];"char"in r||("BLANK_LINE"===r.type?t.items.splice(n,1):e(r))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&e(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error("Unexpected node type "+JSON.stringify(t.type))}},A=Object.defineProperty({removeCstBlankLine:O},"__esModule",{value:!0});var M=function(){return{leadingComments:[]}},L=Object.defineProperty({createLeadingCommentAttachable:M},"__esModule",{value:!0});var N=function(e){return void 0===e&&(e=null),{trailingComment:e}},T=Object.defineProperty({createTrailingCommentAttachable:N},"__esModule",{value:!0});var P=function(){return l.__assign(l.__assign({},L.createLeadingCommentAttachable()),T.createTrailingCommentAttachable())},C=Object.defineProperty({createCommentAttachable:P},"__esModule",{value:!0});var x=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("alias",e)),C.createCommentAttachable()),t),{value:n})},R=Object.defineProperty({createAlias:x},"__esModule",{value:!0});var I=function(e,t){var n=e.cstNode;return R.createAlias(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)},k=Object.defineProperty({transformAlias:I},"__esModule",{value:!0});var B=function(e){return l.__assign(l.__assign({},e),{type:"blockFolded"})},Y=Object.defineProperty({createBlockFolded:B},"__esModule",{value:!0});var $=function(e,t,n,r,o,s){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("blockValue",e)),L.createLeadingCommentAttachable()),t),{chomping:n,indent:r,value:o,indicatorComment:s})},j=Object.defineProperty({createBlockValue:$},"__esModule",{value:!0}),D=r((function(e,t){var n;t.__esModule=!0,(n=t.PropLeadingCharacter||(t.PropLeadingCharacter={})).Tag="!",n.Anchor="&",n.Comment="#"}));var U=function(e,t){return l.__assign(l.__assign({},b.createNode("anchor",e)),{value:t})},F=Object.defineProperty({createAnchor:U},"__esModule",{value:!0});var W=function(e,t){return l.__assign(l.__assign({},b.createNode("comment",e)),{value:t})},Q=Object.defineProperty({createComment:W},"__esModule",{value:!0});var V=function(e,t,n){return{anchor:t,tag:e,middleComments:n}},K=Object.defineProperty({createContent:V},"__esModule",{value:!0});var q=function(e,t){return l.__assign(l.__assign({},b.createNode("tag",e)),{value:t})},J=Object.defineProperty({createTag:q},"__esModule",{value:!0});var G,H=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,o=[],s=null,i=null,a=null,c=0,l=r.props;c<l.length;c++){var u=l[c],f=t.text[u.origStart];switch(f){case D.PropLeadingCharacter.Tag:s=s||u,i=J.createTag(t.transformRange(u),e.tag);break;case D.PropLeadingCharacter.Anchor:s=s||u,a=F.createAnchor(t.transformRange(u),r.anchor);break;case D.PropLeadingCharacter.Comment:var h=Q.createComment(t.transformRange(u),t.text.slice(u.origStart+1,u.origEnd));t.comments.push(h),!n(h)&&s&&s.origEnd<=u.origStart&&u.origEnd<=r.valueRange.origStart&&o.push(h);break;default:throw new Error("Unexpected leading character "+JSON.stringify(f))}}return K.createContent(i,a,o)},z=Object.defineProperty({transformContent:H},"__esModule",{value:!0});!function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"}(G||(G={}));var Z=function(e,t){var n=e.cstNode,r="CLIP"===n.chomping?0:1,o=n.header.origEnd-n.header.origStart-1-r!=0,s=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),i=null,a=z.transformContent(e,t,(function(e){if(!(s.start.offset<e.position.start.offset&&e.position.end.offset<s.end.offset))return!1;if(i)throw new Error("Unexpected multiple indicator comments at "+d.getPointText(e.position.start));return i=e,!0}));return j.createBlockValue(s,a,G[n.chomping],o?n.blockIndent:null,n.strValue,i)},X=Object.defineProperty({transformAstBlockValue:Z},"__esModule",{value:!0});var ee=function(e,t){return Y.createBlockFolded(X.transformAstBlockValue(e,t))},te=Object.defineProperty({transformBlockFolded:ee},"__esModule",{value:!0});var ne=function(e){return l.__assign(l.__assign({},e),{type:"blockLiteral"})},re=Object.defineProperty({createBlockLiteral:ne},"__esModule",{value:!0});var oe=function(e,t){return re.createBlockLiteral(X.transformAstBlockValue(e,t))},se=Object.defineProperty({transformBlockLiteral:oe},"__esModule",{value:!0});var ie=function(e,t){return Q.createComment(t.transformRange(e.range),e.comment)},ae=Object.defineProperty({transformComment:ie},"__esModule",{value:!0});var ce=function(e,t,n){return l.__assign(l.__assign(l.__assign({},b.createNode("directive",e)),C.createCommentAttachable()),{name:t,parameters:n})},le=Object.defineProperty({createDirective:ce},"__esModule",{value:!0});var ue=function(e,t){for(var n=0,r=e.props;n<r.length;n++){var o=r[n],s=t.text[o.origStart];switch(s){case D.PropLeadingCharacter.Comment:t.comments.push(Q.createComment(t.transformRange(o),t.text.slice(o.origStart+1,o.origEnd)));break;default:throw new Error("Unexpected leading character "+JSON.stringify(s))}}},fe=Object.defineProperty({extractPropComments:ue},"__esModule",{value:!0});var he=function(e,t){return fe.extractPropComments(e,t),le.createDirective(t.transformRange(e.range),e.name,e.parameters)},pe=Object.defineProperty({transformDirective:he},"__esModule",{value:!0});var de=function(e,t,n,r){return l.__assign(l.__assign(l.__assign({},b.createNode("document",e)),T.createTrailingCommentAttachable(r)),{children:[t,n]})},ge=Object.defineProperty({createDocument:de},"__esModule",{value:!0});var me=function(e,t){return{start:e,end:t}};var ye=function(e){return{start:e,end:e}},ve=Object.defineProperty({createPosition:me,createEmptyPosition:ye},"__esModule",{value:!0});var _e=function(e){return void 0===e&&(e=[]),{endComments:e}},we=Object.defineProperty({createEndCommentAttachable:_e},"__esModule",{value:!0});var be=function(e,t,n){return l.__assign(l.__assign(l.__assign({},b.createNode("documentBody",e)),we.createEndCommentAttachable(n)),{children:t?[t]:[]})},Ee=Object.defineProperty({createDocumentBody:be},"__esModule",{value:!0});var Se=function(e){return e[e.length-1]},Oe=Object.defineProperty({getLast:Se},"__esModule",{value:!0});var Ae=function(e,t){var n=e.match(t);return n?n.index:-1},Me=Object.defineProperty({getMatchIndex:Ae},"__esModule",{value:!0});var Le=function(e,t,n){var r,o=e.cstNode,s=function(e,t,n){for(var r=[],o=[],s=[],i=[],a=!1,c=e.contents.length-1;c>=0;c--){var l=e.contents[c];if("COMMENT"===l.type){var u=t.transformNode(l);n&&n.line===u.position.start.line?i.unshift(u):a?r.unshift(u):u.position.start.offset>=e.valueRange.origEnd?s.unshift(u):r.unshift(u)}else a=!0}if(s.length>1)throw new Error("Unexpected multiple document trailing comments at "+d.getPointText(s[1].position.start));if(i.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+d.getPointText(i[1].position.start));return{comments:r,endComments:o,documentTrailingComment:Oe.getLast(s)||null,documentHeadTrailingComment:Oe.getLast(i)||null}}(o,t,n),i=s.comments,a=s.endComments,c=s.documentTrailingComment,u=s.documentHeadTrailingComment,f=t.transformNode(e.contents),h=function(e,t,n){var r=Me.getMatchIndex(n.text.slice(e.valueRange.origEnd),/^\.\.\./),o=-1===r?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);"\r"===n.text[o-1]&&o--;var s=n.transformRange({origStart:null!==t?t.position.start.offset:o,origEnd:o}),i=-1===r?s.end:n.transformOffset(e.valueRange.origEnd+3);return{position:s,documentEndPoint:i}}(o,f,t),p=h.position,g=h.documentEndPoint;return(r=t.comments).push.apply(r,l.__spreadArrays(i,a)),{documentBody:Ee.createDocumentBody(p,f,a),documentEndPoint:g,documentTrailingComment:c,documentHeadTrailingComment:u}};var Ne=Object.defineProperty({transformDocumentBody:Le},"__esModule",{value:!0});var Te=function(e,t,n,r){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("documentHead",e)),we.createEndCommentAttachable(n)),T.createTrailingCommentAttachable(r)),{children:t})},Pe=Object.defineProperty({createDocumentHead:Te},"__esModule",{value:!0});var Ce=function(e,t){var n,r=e.cstNode,o=function(e,t){for(var n=[],r=[],o=[],s=!1,i=e.directives.length-1;i>=0;i--){var a=t.transformNode(e.directives[i]);"comment"===a.type?s?r.unshift(a):o.unshift(a):(s=!0,n.unshift(a))}return{directives:n,comments:r,endComments:o}}(r,t),s=o.directives,i=o.comments,a=o.endComments,c=function(e,t,n){var r=Me.getMatchIndex(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);var o=-1===r?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};0!==t.length&&(o.origStart=t[0].position.start.offset);return{position:n.transformRange(o),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(r,s,t),u=c.position,f=c.endMarkerPoint;return(n=t.comments).push.apply(n,l.__spreadArrays(i,a)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),Pe.createDocumentHead(u,s,a,e)},documentHeadEndMarkerPoint:f}};var xe=Object.defineProperty({transformDocumentHead:Ce},"__esModule",{value:!0});var Re=function(e,t){var n=xe.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,o=n.documentHeadEndMarkerPoint,s=Ne.transformDocumentBody(e,t,o),i=s.documentBody,a=s.documentEndPoint,c=s.documentTrailingComment,l=r(s.documentHeadTrailingComment);return c&&t.comments.push(c),ge.createDocument(ve.createPosition(l.position.start,a),l,i,c)},Ie=Object.defineProperty({transformDocument:Re},"__esModule",{value:!0});var ke=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("flowCollection",e)),C.createCommentAttachable()),we.createEndCommentAttachable()),t),{children:n})},Be=Object.defineProperty({createFlowCollection:ke},"__esModule",{value:!0});var Ye=function(e,t,n){return l.__assign(l.__assign({},Be.createFlowCollection(e,t,n)),{type:"flowMapping"})},$e=Object.defineProperty({createFlowMapping:Ye},"__esModule",{value:!0});var je=function(e,t,n){return l.__assign(l.__assign(l.__assign({},b.createNode("flowMappingItem",e)),L.createLeadingCommentAttachable()),{children:[t,n]})},De=Object.defineProperty({createFlowMappingItem:je},"__esModule",{value:!0});var Ue=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var s=o[r];s&&"type"in s&&"COMMENT"===s.type?t.comments.push(t.transformNode(s)):n.push(s)}return n},Fe=Object.defineProperty({extractComments:Ue},"__esModule",{value:!0});var We=function(e){var t=["?",":"].map((function(t){var n=e.find((function(e){return"char"in e&&e.char===t}));return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null}));return{additionalKeyRange:t[0],additionalValueRange:t[1]}},Qe=Object.defineProperty({getFlowMapItemAdditionalRanges:We},"__esModule",{value:!0});var Ve=function(e,t){var n=t;return function(t){return e.slice(n,n=t)}},Ke=Object.defineProperty({createSlicer:Ve},"__esModule",{value:!0});var qe=function(e){for(var t=[],n=Ke.createSlicer(e,1),r=!1,o=1;o<e.length-1;o++){var s=e[o];"char"in s&&","===s.char?(t.push(n(o)),n(o+1),r=!1):r=!0}return r&&t.push(n(e.length-1)),t},Je=Object.defineProperty({groupCstFlowCollectionItems:qe},"__esModule",{value:!0});var Ge=function(e,t){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("mappingKey",e)),T.createTrailingCommentAttachable()),we.createEndCommentAttachable()),{children:t?[t]:[]})},He=Object.defineProperty({createMappingKey:Ge},"__esModule",{value:!0});var ze=function(e,t){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("mappingValue",e)),C.createCommentAttachable()),we.createEndCommentAttachable()),{children:t?[t]:[]})},Ze=Object.defineProperty({createMappingValue:ze},"__esModule",{value:!0});var Xe=function(e,t,n,r,o){var s=t.transformNode(e.key),i=t.transformNode(e.value),a=s||r?He.createMappingKey(t.transformRange({origStart:r?r.origStart:s.position.start.offset,origEnd:s?s.position.end.offset:r.origStart+1}),s):null,c=i||o?Ze.createMappingValue(t.transformRange({origStart:o?o.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:o.origStart+1}),i):null;return n(ve.createPosition(a?a.position.start:c.position.start,c?c.position.end:a.position.end),a||He.createMappingKey(ve.createEmptyPosition(c.position.start),null),c||Ze.createMappingValue(ve.createEmptyPosition(a.position.end),null))},et=Object.defineProperty({transformAstPair:Xe},"__esModule",{value:!0});var tt=function(e,t){var n=Fe.extractComments(e.cstNode.items,t),r=Je.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){var o=r[n],s=Qe.getFlowMapItemAdditionalRanges(o),i=s.additionalKeyRange,a=s.additionalValueRange;return et.transformAstPair(e,t,De.createFlowMappingItem,i,a)})),s=n[0],i=Oe.getLast(n);return $e.createFlowMapping(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)},nt=Object.defineProperty({transformFlowMap:tt},"__esModule",{value:!0});var rt=function(e,t,n){return l.__assign(l.__assign({},Be.createFlowCollection(e,t,n)),{type:"flowSequence"})},ot=Object.defineProperty({createFlowSequence:rt},"__esModule",{value:!0});var st=function(e,t){return l.__assign(l.__assign({},b.createNode("flowSequenceItem",e)),{children:[t]})},it=Object.defineProperty({createFlowSequenceItem:st},"__esModule",{value:!0});var at=function(e,t){var n=Fe.extractComments(e.cstNode.items,t),r=Je.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){if("PAIR"!==e.type){var o=t.transformNode(e);return it.createFlowSequenceItem(ve.createPosition(o.position.start,o.position.end),o)}var s=r[n],i=Qe.getFlowMapItemAdditionalRanges(s),a=i.additionalKeyRange,c=i.additionalValueRange;return et.transformAstPair(e,t,De.createFlowMappingItem,a,c)})),s=n[0],i=Oe.getLast(n);return ot.createFlowSequence(t.transformRange({origStart:s.origOffset,origEnd:i.origOffset+1}),t.transformContent(e),o)},ct=Object.defineProperty({transformFlowSeq:at},"__esModule",{value:!0});var lt=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("mapping",e)),L.createLeadingCommentAttachable()),t),{children:n})},ut=Object.defineProperty({createMapping:lt},"__esModule",{value:!0});var ft=function(e,t,n){return l.__assign(l.__assign(l.__assign({},b.createNode("mappingItem",e)),L.createLeadingCommentAttachable()),{children:[t,n]})},ht=Object.defineProperty({createMappingItem:ft},"__esModule",{value:!0});var pt=function(e,t){var n=e.cstNode;n.items.filter((function(e){return"MAP_KEY"===e.type||"MAP_VALUE"===e.type})).forEach((function(e){return fe.extractPropComments(e,t)}));var r=function(e){for(var t=[],n=Ke.createSlicer(e,0),r=!1,o=0;o<e.length;o++){"MAP_VALUE"!==e[o].type?(r&&t.push(n(o)),r=!0):(t.push(n(o+1)),r=!1)}r&&t.push(n(1/0));return t}(Fe.extractComments(n.items,t)),o=e.items.map((function(e,n){var o=r[n],s="MAP_VALUE"===o[0].type?[null,o[0].range]:[o[0].range,1===o.length?null:o[1].range],i=s[0],a=s[1];return et.transformAstPair(e,t,ht.createMappingItem,i,a)}));return ut.createMapping(ve.createPosition(o[0].position.start,Oe.getLast(o).position.end),t.transformContent(e),o)};var dt=Object.defineProperty({transformMap:pt},"__esModule",{value:!0});var gt=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("plain",e)),C.createCommentAttachable()),t),{value:n})},mt=Object.defineProperty({createPlain:gt},"__esModule",{value:!0});var yt=function(e,t,n){for(var r=t;r>=0;r--)if(n.test(e[r]))return r;return-1},vt=Object.defineProperty({findLastCharIndex:yt},"__esModule",{value:!0});var _t=function(e,t){var n=e.cstNode;return mt.createPlain(t.transformRange({origStart:n.valueRange.origStart,origEnd:vt.findLastCharIndex(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)},wt=Object.defineProperty({transformPlain:_t},"__esModule",{value:!0});var bt=function(e){return l.__assign(l.__assign({},e),{type:"quoteDouble"})},Et=Object.defineProperty({createQuoteDouble:bt},"__esModule",{value:!0});var St=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("quoteValue",e)),t),C.createCommentAttachable()),{value:n})},Ot=Object.defineProperty({createQuoteValue:St},"__esModule",{value:!0});var At=function(e,t){var n=e.cstNode;return Ot.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)},Mt=Object.defineProperty({transformAstQuoteValue:At},"__esModule",{value:!0});var Lt=function(e,t){return Et.createQuoteDouble(Mt.transformAstQuoteValue(e,t))},Nt=Object.defineProperty({transformQuoteDouble:Lt},"__esModule",{value:!0});var Tt=function(e){return l.__assign(l.__assign({},e),{type:"quoteSingle"})},Pt=Object.defineProperty({createQuoteSingle:Tt},"__esModule",{value:!0});var Ct=function(e,t){return Pt.createQuoteSingle(Mt.transformAstQuoteValue(e,t))},xt=Object.defineProperty({transformQuoteSingle:Ct},"__esModule",{value:!0});var Rt=function(e,t,n){return l.__assign(l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("sequence",e)),L.createLeadingCommentAttachable()),we.createEndCommentAttachable()),t),{children:n})},It=Object.defineProperty({createSequence:Rt},"__esModule",{value:!0});var kt=function(e,t){return l.__assign(l.__assign(l.__assign(l.__assign({},b.createNode("sequenceItem",e)),C.createCommentAttachable()),we.createEndCommentAttachable()),{children:t?[t]:[]})},Bt=Object.defineProperty({createSequenceItem:kt},"__esModule",{value:!0});var Yt=function(e,t){var n=Fe.extractComments(e.cstNode.items,t).map((function(n,r){fe.extractPropComments(n,t);var o=t.transformNode(e.items[r]);return Bt.createSequenceItem(ve.createPosition(t.transformOffset(n.valueRange.origStart),null===o?t.transformOffset(n.valueRange.origStart+1):o.position.end),o)}));return It.createSequence(ve.createPosition(n[0].position.start,Oe.getLast(n).position.end),t.transformContent(e),n)},$t=Object.defineProperty({transformSeq:Yt},"__esModule",{value:!0});var jt=function(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return k.transformAlias(e,t);case"BLOCK_FOLDED":return te.transformBlockFolded(e,t);case"BLOCK_LITERAL":return se.transformBlockLiteral(e,t);case"COMMENT":return ae.transformComment(e,t);case"DIRECTIVE":return pe.transformDirective(e,t);case"DOCUMENT":return Ie.transformDocument(e,t);case"FLOW_MAP":return nt.transformFlowMap(e,t);case"FLOW_SEQ":return ct.transformFlowSeq(e,t);case"MAP":return dt.transformMap(e,t);case"PLAIN":return wt.transformPlain(e,t);case"QUOTE_DOUBLE":return Nt.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return xt.transformQuoteSingle(e,t);case"SEQ":return $t.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}},Dt=Object.defineProperty({transformNode:jt},"__esModule",{value:!0});var Ut=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r},Ft=Object.defineProperty({createError:Ut},"__esModule",{value:!0});var Wt=function(e,t){var n=e.source.range||e.source.valueRange;return Ft.createError(e.message,t.text,t.transformRange(n))},Qt=Object.defineProperty({transformError:Wt},"__esModule",{value:!0});var Vt=function(e,t,n){return{offset:e,line:t,column:n}},Kt=Object.defineProperty({createPoint:Vt},"__esModule",{value:!0});var qt=function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);var n=t.locator.locationForIndex(e);return Kt.createPoint(e,n.line+1,n.column+1)},Jt=Object.defineProperty({transformOffset:qt},"__esModule",{value:!0});var Gt=function(e,t){return ve.createPosition(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))},Ht=Object.defineProperty({transformRange:Gt},"__esModule",{value:!0}),zt=!0;var Zt=function(e){if(!e.setOrigRanges()){var t=function(e){return function(e){return"number"==typeof e.start}(e)?(e.origStart=e.start,e.origEnd=e.end,zt):function(e){return"number"==typeof e.offset}(e)?(e.origOffset=e.offset,zt):void 0};e.forEach((function(e){return Xt(e,t)}))}};function Xt(e,t){if(e&&"object"==typeof e&&t(e)!==zt)for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if("context"!==o&&"error"!==o){var s=e[o];Array.isArray(s)?s.forEach((function(e){return Xt(e,t)})):Xt(s,t)}}}var en=Object.defineProperty({addOrigRange:Zt},"__esModule",{value:!0});var tn=function e(t){if("children"in t){if(1===t.children.length){var n=t.children[0];if("plain"===n.type&&null===n.tag&&null===n.anchor&&""===n.value)return t.children.splice(0,1),t}t.children.forEach(e)}return t},nn=Object.defineProperty({removeFakeNodes:tn},"__esModule",{value:!0});var rn=function(e,t,n,r){var o=t(e);return function(t){r(o,t)&&n(e,o=t)}},on=Object.defineProperty({createUpdater:rn},"__esModule",{value:!0});var sn=function e(t){if(null!==t&&"children"in t){var n=t.children;if(n.forEach(e),"document"===t.type){var r=t.children,o=r[0],s=r[1];o.position.start.offset===o.position.end.offset?o.position.start=o.position.end=s.position.start:s.position.start.offset===s.position.end.offset&&(s.position.start=s.position.end=o.position.end)}var i=on.createUpdater(t.position,an,cn,fn),a=on.createUpdater(t.position,ln,un,hn);"endComments"in t&&0!==t.endComments.length&&(i(t.endComments[0].position.start),a(Oe.getLast(t.endComments).position.end));var c=n.filter((function(e){return null!==e}));if(0!==c.length){var l=c[0],u=Oe.getLast(c);i(l.position.start),a(u.position.end),"leadingComments"in l&&0!==l.leadingComments.length&&i(l.leadingComments[0].position.start),"tag"in l&&l.tag&&i(l.tag.position.start),"anchor"in l&&l.anchor&&i(l.anchor.position.start),"trailingComment"in u&&u.trailingComment&&a(u.trailingComment.position.end)}}};function an(e){return e.start}function cn(e,t){e.start=t}function ln(e){return e.end}function un(e,t){e.end=t}function fn(e,t){return t.offset<e.offset}function hn(e,t){return t.offset>e.offset}var pn=Object.defineProperty({updatePositions:sn},"__esModule",{value:!0});const dn={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},gn={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 mn(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 yn(e){let t,n;return"string"==typeof e?(t=mn(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=mn(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function vn(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=yn(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 o=n.length;return{line:o,col:e-n[o-1]+1}}function _n({start:e,end:t},n,r=80){let o=function(e,t){const{lineStarts:n,src:r}=yn(t);if(!n||!(e>=1)||e>n.length)return null;const o=n[e-1];let s=n[e];for(;s&&s>o&&"\n"===r[s-1];)--s;return r.slice(o,s)}(e.line,n);if(!o)return null;let{col:s}=e;if(o.length>r)if(s<=r-10)o=o.substr(0,r-1)+"\u2026";else{const e=Math.round(r/2);o.length>s+e&&(o=o.substr(0,s+e-1)+"\u2026"),s-=o.length-r,o="\u2026"+o.substr(1-r)}let i=1,a="";t&&(t.line===e.line&&s+(t.col-e.col)<=r+1?i=t.col-e.col:(i=Math.min(o.length+1,r)-s,a="\u2026"));return`${o}\n${s>1?" ".repeat(s-1):""}${"^".repeat(i)}${a}`}class wn{static copy(e){return new wn(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 o=t;for(;o<e.length&&!(e[o]>n);)++o;this.origStart=n+o;const s=o;for(;o<e.length&&!(e[o]>=r);)++o;return this.origEnd=r+o,s}}class bn{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=bn.endOfWhiteSpace(e,t);return r>=e.length||"\n"===e[r]?n+"\n":n}static atDocumentBoundary(e,t,n){const r=e[t];if(!r)return!0;const o=e[t-1];if(o&&"\n"!==o)return!1;if(n){if(r!==n)return!1}else if(r!==dn.DIRECTIVES_END&&r!==dn.DOCUMENT_END)return!1;const s=e[t+1],i=e[t+2];if(s!==r||i!==r)return!1;const a=e[t+3];return!a||"\n"===a||"\t"===a||" "===a}static endOfIdentifier(e,t){let n=e[t];const r="<"===n,o=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===o.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=bn.endOfIndent(e,n);if(r>n+t)return r;{const t=bn.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:bn.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,o=!1,s="",i=e[t+1];for(;" "===i||"\t"===i||"\n"===i;){switch(i){case"\n":r=0,t+=1,s+="\n";break;case"\t":r<=n&&(o=!0),t=bn.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}i=e[t+1]}return s||(s=" "),i&&r<=n&&(o=!0),{fold:s,offset:t,error:o}}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,o=this.props[e];return o&&r[o.start]===t?r.slice(o.start+(n?1:0),o.end):null}get anchor(){for(let e=0;e<this.props.length;++e){const t=this.getPropValue(e,dn.ANCHOR,!0);if(null!=t)return t}return null}get comment(){const e=[];for(let t=0;t<this.props.length;++t){const n=this.getPropValue(t,dn.COMMENT,!0);null!=n&&e.push(n)}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||bn.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]===dn.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]!==dn.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[gn.FLOW_MAP,gn.FLOW_SEQ,gn.QUOTE_DOUBLE,gn.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=vn(this.range.start,this.context.root);if(!e)return;return{start:e,end:vn(this.range.end,this.context.root)}}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,dn.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]===dn.COMMENT){const n=bn.endOfLine(t,e+1),r=new wn(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 bn.addStringTerminator(e,t.end,r)}}class En extends Error{constructor(e,t,n){if(!(n&&t instanceof bn))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 wn(this.offset,this.offset+1);const t=e&&vn(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&&_n(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}}class Sn extends En{constructor(e,t){super("YAMLSemanticError",e,t)}}class On extends bn{static endOfLine(e,t,n){let r=e[t],o=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){const t=e[o+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t))break;if((" "===r||"\t"===r)&&"#"===t)break;o+=1,r=t}return o}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 o="";for(let r=e;r<t;++r){const e=n[r];if("\n"===e){const{fold:e,offset:t}=bn.foldNewline(n,r,-1);o+=e,r=t}else if(" "===e||"\t"===e){const s=r;let i=n[r+1];for(;r<t&&(" "===i||"\t"===i);)r+=1,i=n[r+1];"\n"!==i&&(o+=r>s?n.slice(s,r+1):e)}else o+=e}const s=n[e];switch(s){case"\t":return{errors:[new Sn(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":return{errors:[new Sn(this,`Plain value cannot start with reserved character ${s}`)],str:o};default:return o}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let o=e,s=e;for(let e=r[o];"\n"===e&&!bn.atDocumentBoundary(r,o+1);e=r[o]){const e=bn.endOfBlockIndent(r,t,o+1);if(null===e||"#"===r[e])break;"\n"===r[e]?o=e:(s=On.endOfLine(r,e,n),o=s)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let o=t;const s=r[o];return s&&"#"!==s&&"\n"!==s&&(o=On.endOfLine(r,t,n)),this.valueRange=new wn(t,o),o=bn.endOfWhiteSpace(r,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}var An={Char:dn,Node:bn,PlainValue:On,Range:wn,Type:gn,YAMLError:En,YAMLReferenceError:class extends En{constructor(e,t){super("YAMLReferenceError",e,t)}},YAMLSemanticError:Sn,YAMLSyntaxError:class extends En{constructor(e,t){super("YAMLSyntaxError",e,t)}},YAMLWarning:class extends En{constructor(e,t){super("YAMLWarning",e,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},defaultTagPrefix:"tag:yaml.org,2002:",defaultTags:{MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}};class Mn extends An.Node{constructor(){super(An.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new An.Range(t,t+1),t+1}}class Ln extends An.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:r}=e;let{atLineStart:o,lineStart:s}=e;o||this.type!==An.Type.SEQ_ITEM||(this.error=new An.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const i=o?t-s:e.indent;let a=An.Node.endOfWhiteSpace(r,t+1),c=r[a];const l="#"===c,u=[];let f=null;for(;"\n"===c||"#"===c;){if("#"===c){const e=An.Node.endOfLine(r,a+1);u.push(new An.Range(a,e)),a=e}else{o=!0,s=a+1;"\n"===r[An.Node.endOfWhiteSpace(r,s)]&&0===u.length&&(f=new Mn,s=f.parse({src:r},s)),a=An.Node.endOfIndent(r,s)}c=r[a]}if(An.Node.nextNodeIsIndented(c,a-(s+i),this.type!==An.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:i,lineStart:s,parent:this},a):c&&s>t+1&&(a=s-1),this.node){if(f){const t=e.parent.items||e.parent.contents;t&&t.push(f)}u.length&&Array.prototype.push.apply(this.props,u),a=this.node.range.end}else if(l){const e=u[0];this.props.push(e),a=e.end}else a=An.Node.endOfLine(r,t+1);const h=this.node?this.node.valueRange.end:a;return this.valueRange=new An.Range(t,h),a}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:r}=this;if(null!=r)return r;const o=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return An.Node.addStringTerminator(e,n.end,o)}}class Nn extends An.Node{constructor(){super(An.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new An.Range(t,n),n}}function Tn(e){let t=e;for(;t instanceof Ln;)t=t.node;if(!(t instanceof Pn))return null;const n=t.items.length;let r=-1;for(let e=n-1;e>=0;--e){const n=t.items[e];if(n.type===An.Type.COMMENT){const{indent:t,lineStart:o}=n.context;if(t>0&&n.range.start>=o+t)break;r=e}else{if(n.type!==An.Type.BLANK_LINE)break;r=e}}if(-1===r)return null;const o=t.items.splice(r,n-r),s=o[0].range.start;for(;t.range.end=s,t.valueRange&&t.valueRange.end>s&&(t.valueRange.end=s),t!==e;)t=t.context.parent;return o}class Pn extends An.Node{static nextContentHasIndent(e,t,n){const r=An.Node.endOfLine(e,t)+1,o=e[t=An.Node.endOfWhiteSpace(e,r)];return!!o&&(t>=r+n||("#"===o||"\n"===o)&&Pn.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===An.Type.SEQ_ITEM?An.Type.SEQ:An.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=Tn(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:r}=e;let o=An.Node.startOfLine(r,t);const s=this.items[0];s.context.parent=this,this.valueRange=An.Range.copy(s.valueRange);const i=s.range.start-s.context.lineStart;let a=t;a=An.Node.normalizeOffset(r,a);let c=r[a],l=An.Node.endOfWhiteSpace(r,o)===a,u=!1;for(;c;){for(;"\n"===c||"#"===c;){if(l&&"\n"===c&&!u){const e=new Mn;if(a=e.parse({src:r},a),this.valueRange.end=a,a>=r.length){c=null;break}this.items.push(e),a-=1}else if("#"===c){if(a<o+i&&!Pn.nextContentHasIndent(r,a,i))return a;const e=new Nn;if(a=e.parse({indent:i,lineStart:o,src:r},a),this.items.push(e),this.valueRange.end=a,a>=r.length){c=null;break}}if(o=a+1,a=An.Node.endOfIndent(r,o),An.Node.atBlank(r,a)){const e=An.Node.endOfWhiteSpace(r,a),t=r[e];t&&"\n"!==t&&"#"!==t||(a=e)}c=r[a],l=!0}if(!c)break;if(a!==o+i&&(l||":"!==c)){if(a<o+i){o>t&&(a=o);break}if(!this.error){const e="All collection items must start at the same column";this.error=new An.YAMLSyntaxError(this,e)}}if(s.type===An.Type.SEQ_ITEM){if("-"!==c){o>t&&(a=o);break}}else if("-"===c&&!this.error){const e=r[a+1];if(!e||"\n"===e||"\t"===e||" "===e){const e="A collection cannot be both a mapping and a sequence";this.error=new An.YAMLSyntaxError(this,e)}}const e=n({atLineStart:l,inCollection:!0,indent:i,lineStart:o,parent:this},a);if(!e)return a;if(this.items.push(e),this.valueRange.end=e.valueRange.end,a=An.Node.normalizeOffset(r,e.range.end),c=r[a],l=!1,u=e.includesTrailingLines,c){let e=a-1,t=r[e];for(;" "===t||"\t"===t;)t=r[--e];"\n"===t&&(o=e+1,l=!0)}const f=Tn(e);f&&Array.prototype.push.apply(this.items,f)}return a}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:r}=this;if(null!=r)return r;let o=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)o+=" ";o+=String(n)}return An.Node.addStringTerminator(e,n.end,o)}}class Cn extends An.Node{constructor(){super(An.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,r=t[n];for(;r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new An.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 An.Range(t,n),n}}class xn extends An.Node{static startCommentOrEndBlankLine(e,t){const n=An.Node.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}constructor(){super(An.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,r=!1,o=e;for(;!An.Node.atDocumentBoundary(t,o,An.Char.DIRECTIVES_END);)switch(o=xn.startCommentOrEndBlankLine(t,o),t[o]){case"\n":if(n){const e=new Mn;o=e.parse({src:t},o),o<t.length&&this.directives.push(e)}else o+=1,n=!0;break;case"#":{const e=new Nn;o=e.parse({src:t},o),this.directives.push(e),n=!1}break;case"%":{const e=new Cn;o=e.parse({parent:this,src:t},o),this.directives.push(e),r=!0,n=!1}break;default:return r?this.error=new An.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new An.Range(o,o+3),o+3):(r?this.error=new An.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}parseContents(e){const{parseNode:t,src:n}=this.context;this.contents||(this.contents=[]);let r=e;for(;"-"===n[r-1];)r-=1;let o=An.Node.endOfWhiteSpace(n,e),s=r===e;for(this.valueRange=new An.Range(o);!An.Node.atDocumentBoundary(n,o,An.Char.DOCUMENT_END);){switch(n[o]){case"\n":if(s){const e=new Mn;o=e.parse({src:n},o),o<n.length&&this.contents.push(e)}else o+=1,s=!0;r=o;break;case"#":{const e=new Nn;o=e.parse({src:n},o),this.contents.push(e),s=!1}break;default:{const e=An.Node.endOfIndent(n,o),i=t({atLineStart:s,indent:-1,inFlow:!1,inCollection:!1,lineStart:r,parent:this},e);if(!i)return this.valueRange.end=e;this.contents.push(i),o=i.range.end,s=!1;const a=Tn(i);a&&Array.prototype.push.apply(this.contents,a)}}o=xn.startCommentOrEndBlankLine(n,o)}if(this.valueRange.end=o,n[o]&&(this.documentEndMarker=new An.Range(o,o+3),o+=3,n[o])){if(o=An.Node.endOfWhiteSpace(n,o),"#"===n[o]){const e=new Nn;o=e.parse({src:n},o),this.contents.push(e)}switch(n[o]){case"\n":o+=1;break;case void 0:break;default:this.error=new An.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return o}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 r=t.join("");return e.length>0&&((t.length>0||e[0].type===An.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}class Rn extends An.Node{parse(e,t){this.context=e;const{src:n}=e;let r=An.Node.endOfIdentifier(n,t+1);return this.valueRange=new An.Range(t+1,r),r=An.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}const In="CLIP",kn="KEEP",Bn="STRIP";class Yn extends An.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=In,this.header=null}get includesTrailingLines(){return this.chomping===kn}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:n,src:r}=this.context;if(this.valueRange.isEmpty())return"";let o=null,s=r[t-1];for(;"\n"===s||"\t"===s||" "===s;){if(t-=1,t<=e){if(this.chomping===kn)break;return""}"\n"===s&&(o=t),s=r[t-1]}let i=t+1;o&&(this.chomping===kn?(i=o,t=this.valueRange.end):t=o);const a=n+this.blockIndent,c=this.type===An.Type.BLOCK_FOLDED;let l=!0,u="",f="",h=!1;for(let n=e;n<t;++n){for(let e=0;e<a&&" "===r[n];++e)n+=1;const e=r[n];if("\n"===e)"\n"===f?u+="\n":f="\n";else{const o=An.Node.endOfLine(r,n),s=r.slice(n,o);n=o,c&&(" "===e||"\t"===e)&&n<i?(" "===f?f="\n":h||l||"\n"!==f||(f="\n\n"),u+=f+s,f=o<t&&r[o]||"",h=!0):(u+=f+s,f=c&&n<i?" ":"\n",h=!1),l&&""!==s&&(l=!1)}}return this.chomping===Bn?u:u+"\n"}parseBlockHeader(e){const{src:t}=this.context;let n=e+1,r="";for(;;){const o=t[n];switch(o){case"-":this.chomping=Bn;break;case"+":this.chomping=kn;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=o;break;default:return this.blockIndent=Number(r)||null,this.header=new An.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,r=!!this.blockIndent;let o=e,s=e,i=1;for(let e=n[o];"\n"===e&&(o+=1,!An.Node.atDocumentBoundary(n,o));e=n[o]){const e=An.Node.endOfBlockIndent(n,t,o);if(null===e)break;const a=n[e],c=e-(o+t);if(this.blockIndent){if(a&&"\n"!==a&&c<this.blockIndent){if("#"===n[e])break;if(!this.error){const e=`Block scalars must not be less indented than their ${r?"explicit indentation indicator":"first line"}`;this.error=new An.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(c<i){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new An.YAMLSemanticError(this,e)}this.blockIndent=c}else c>i&&(i=c);o="\n"===n[e]?e:s=An.Node.endOfLine(n,e)}return this.chomping!==kn&&(o=n[s]?s+1:s),this.valueRange=new An.Range(e+1,o),o}parse(e,t){this.context=e;const{src:n}=e;let r=this.parseBlockHeader(t);return r=An.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}}class $n extends An.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===An.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let{indent:o,lineStart:s}=e,i=r[t];this.items=[{char:i,offset:t}];let a=An.Node.endOfWhiteSpace(r,t+1);for(i=r[a];i&&"]"!==i&&"}"!==i;){switch(i){case"\n":s=a+1;if("\n"===r[An.Node.endOfWhiteSpace(r,s)]){const e=new Mn;s=e.parse({src:r},s),this.items.push(e)}if(a=An.Node.endOfIndent(r,s),a<=s+o&&(i=r[a],a<s+o||"]"!==i&&"}"!==i)){const e="Insufficient indentation in flow collection";this.error=new An.YAMLSemanticError(this,e)}break;case",":this.items.push({char:i,offset:a}),a+=1;break;case"#":{const e=new Nn;a=e.parse({src:r},a),this.items.push(e)}break;case"?":case":":{const e=r[a+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===i&&this.prevNodeIsJsonLike()){this.items.push({char:i,offset:a}),a+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:s,parent:this},a);if(!e)return this.valueRange=new An.Range(t,a),a;this.items.push(e),a=An.Node.normalizeOffset(r,e.range.end)}}a=An.Node.endOfWhiteSpace(r,a),i=r[a]}return this.valueRange=new An.Range(t,a+1),i&&(this.items.push({char:i,offset:a}),a=An.Node.endOfWhiteSpace(r,a+1),a=this.parseComment(a)),a}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{if(n instanceof An.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:r}=this;if(null!=r)return r;const o=t.filter((e=>e instanceof An.Node));let s="",i=n.start;return o.forEach((t=>{const n=e.slice(i,t.range.start);i=t.range.end,s+=n+String(t),"\n"===s[s.length-1]&&"\n"!==e[i-1]&&"\n"===e[i]&&(i+=1)})),s+=e.slice(i,n.end),An.Node.addStringTerminator(e,n.end,s)}}class jn extends An.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:r,src:o}=this.context;'"'!==o[n-1]&&e.push(new An.YAMLSyntaxError(this,'Missing closing "quote'));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){An.Node.atDocumentBoundary(o,i+1)&&e.push(new An.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=An.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new An.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(i+=1,o[i]){case"0":s+="\0";break;case"a":s+="\x07";break;case"b":s+="\b";break;case"e":s+="\x1b";break;case"f":s+="\f";break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":s+="\t";break;case"v":s+="\v";break;case"N":s+="\x85";break;case"_":s+="\xa0";break;case"L":s+="\u2028";break;case"P":s+="\u2029";break;case" ":s+=" ";break;case'"':s+='"';break;case"/":s+="/";break;case"\\":s+="\\";break;case"\t":s+="\t";break;case"x":s+=this.parseCharCode(i+1,2,e),i+=2;break;case"u":s+=this.parseCharCode(i+1,4,e),i+=4;break;case"U":s+=this.parseCharCode(i+1,8,e),i+=8;break;case"\n":for(;" "===o[i+1]||"\t"===o[i+1];)i+=1;break;default:e.push(new An.YAMLSyntaxError(this,`Invalid escape sequence ${o.substr(i-1,2)}`)),s+="\\"+o[i]}else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{errors:e,str:s}:s}parseCharCode(e,t,n){const{src:r}=this.context,o=r.substr(e,t),s=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(s)?(n.push(new An.YAMLSyntaxError(this,`Invalid escape sequence ${r.substr(e-2,t+2)}`)),r.substr(e-2,t+2)):String.fromCodePoint(s)}parse(e,t){this.context=e;const{src:n}=e;let r=jn.endOfQuote(n,t+1);return this.valueRange=new An.Range(t,r),r=An.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class Dn extends An.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:r,src:o}=this.context;"'"!==o[n-1]&&e.push(new An.YAMLSyntaxError(this,"Missing closing 'quote"));let s="";for(let i=t+1;i<n-1;++i){const t=o[i];if("\n"===t){An.Node.atDocumentBoundary(o,i+1)&&e.push(new An.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=An.Node.foldNewline(o,i,r);s+=t,i=n,a&&e.push(new An.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)s+=t,i+=1,"'"!==o[i]&&e.push(new An.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=i;let n=o[i+1];for(;" "===n||"\t"===n;)i+=1,n=o[i+1];"\n"!==n&&(s+=i>e?o.slice(e,i+1):t)}else s+=t}return e.length>0?{errors:e,str:s}:s}parse(e,t){this.context=e;const{src:n}=e;let r=Dn.endOfQuote(n,t+1);return this.valueRange=new An.Range(t,r),r=An.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class Un{static parseType(e,t,n){switch(e[t]){case"*":return An.Type.ALIAS;case">":return An.Type.BLOCK_FOLDED;case"|":return An.Type.BLOCK_LITERAL;case"{":return An.Type.FLOW_MAP;case"[":return An.Type.FLOW_SEQ;case"?":return!n&&An.Node.atBlank(e,t+1,!0)?An.Type.MAP_KEY:An.Type.PLAIN;case":":return!n&&An.Node.atBlank(e,t+1,!0)?An.Type.MAP_VALUE:An.Type.PLAIN;case"-":return!n&&An.Node.atBlank(e,t+1,!0)?An.Type.SEQ_ITEM:An.Type.PLAIN;case'"':return An.Type.QUOTE_DOUBLE;case"'":return An.Type.QUOTE_SINGLE;default:return An.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:n,inFlow:r,indent:o,lineStart:s,parent:i}={}){An._defineProperty(this,"parseNode",((e,t)=>{if(An.Node.atDocumentBoundary(this.src,t))return null;const n=new Un(this,e),{props:r,type:o,valueStart:s}=n.parseProps(t),i=function(e,t){switch(e){case An.Type.ALIAS:return new Rn(e,t);case An.Type.BLOCK_FOLDED:case An.Type.BLOCK_LITERAL:return new Yn(e,t);case An.Type.FLOW_MAP:case An.Type.FLOW_SEQ:return new $n(e,t);case An.Type.MAP_KEY:case An.Type.MAP_VALUE:case An.Type.SEQ_ITEM:return new Ln(e,t);case An.Type.COMMENT:case An.Type.PLAIN:return new An.PlainValue(e,t);case An.Type.QUOTE_DOUBLE:return new jn(e,t);case An.Type.QUOTE_SINGLE:return new Dn(e,t);default:return null}}(o,r);let a=i.parse(n,s);if(i.range=new An.Range(t,a),a<=t&&(i.error=new Error("Node#parse consumed no characters"),i.error.parseEnd=a,i.error.source=i,i.range.end=t+1),n.nodeStartsCollection(i)){i.error||n.atLineStart||n.parent.type!==An.Type.DOCUMENT||(i.error=new An.YAMLSyntaxError(i,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new Pn(i);return a=e.parse(new Un(n),a),e.range=new An.Range(t,a),e}return i})),this.atLineStart=null!=t?t:e.atLineStart||!1,this.inCollection=null!=n?n:e.inCollection||!1,this.inFlow=null!=r?r:e.inFlow||!1,this.indent=null!=o?o:e.indent,this.lineStart=null!=s?s:e.lineStart,this.parent=null!=i?i:e.parent||{},this.root=e.root,this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:n,src:r}=this;if(t||n)return!1;if(e instanceof Ln)return!0;let o=e.range.end;return"\n"!==r[o]&&"\n"!==r[o-1]&&(o=An.Node.endOfWhiteSpace(r,o),":"===r[o])}parseProps(e){const{inFlow:t,parent:n,src:r}=this,o=[];let s=!1,i=r[e=this.atLineStart?An.Node.endOfIndent(r,e):An.Node.endOfWhiteSpace(r,e)];for(;i===An.Char.ANCHOR||i===An.Char.COMMENT||i===An.Char.TAG||"\n"===i;){if("\n"===i){let t,o=e;do{t=o+1,o=An.Node.endOfIndent(r,t)}while("\n"===r[o]);const i=o-(t+this.indent),a=n.type===An.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==r[o]&&!An.Node.nextNodeIsIndented(r[o],i,!a))break;this.atLineStart=!0,this.lineStart=t,s=!1,e=o}else if(i===An.Char.COMMENT){const t=An.Node.endOfLine(r,e+1);o.push(new An.Range(e,t)),e=t}else{let t=An.Node.endOfIdentifier(r,e+1);i===An.Char.TAG&&","===r[t]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(r.slice(e+1,t+13))&&(t=An.Node.endOfIdentifier(r,t+5)),o.push(new An.Range(e,t)),s=!0,e=An.Node.endOfWhiteSpace(r,t)}i=r[e]}s&&":"===i&&An.Node.atBlank(r,e+1,!0)&&(e-=1);return{props:o,type:Un.parseType(r,e,t),valueStart:e}}}var Fn={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 xn,o=new Un({src:e});r=t.parse(o,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}};function Wn(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}class Qn{}function Vn(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>Vn(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 o=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(o),o}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}class Kn extends Qn{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:Vn(this.value,e,t)}toString(){return String(this.value)}}function qn(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 Jn=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class Gn extends Qn{constructor(e){super(),An._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(Jn(e))this.add(t);else{const[n,...r]=e,o=this.get(n,!0);if(o instanceof Gn)o.addIn(r,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,qn(this.schema,r,t))}}}deleteIn([e,...t]){if(0===t.length)return this.delete(e);const n=this.get(e,!0);if(n instanceof Gn)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 Kn?r.value:r:r instanceof Gn?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 Kn&&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 Gn&&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 Gn)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,qn(this.schema,t,n))}}}toJSON(){return null}toString(e,{blockItem:t,flowChars:n,isMap:r,itemIndent:o},s,i){const{indent:a,indentStep:c,stringify:l}=e,u=this.type===An.Type.FLOW_MAP||this.type===An.Type.FLOW_SEQ||e.inFlow;u&&(o+=c);const f=r&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:f,indent:o,inFlow:u,type:null});let h=!1,p=!1;const d=this.items.reduce(((t,n,r)=>{let s;n&&(!h&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:`#${e}`})})),n.comment&&(s=n.comment),u&&(!h&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(p=!0)),h=!1;let i=l(n,e,(()=>s=null),(()=>h=!0));return u&&!p&&i.includes("\n")&&(p=!0),u&&r<this.items.length-1&&(i+=","),i=Wn(i,o,s),h&&(s||u)&&(h=!1),t.push({type:"item",str:i}),t}),[]);let g;if(0===d.length)g=n.start+n.end;else if(u){const{start:e,end:t}=n,r=d.map((e=>e.str));if(p||r.reduce(((e,t)=>e+t.length+2),2)>Gn.maxFlowStringSingleLineLength){g=e;for(const e of r)g+=e?`\n${c}${a}${e}`:"\n";g+=`\n${a}${t}`}else g=`${e} ${r.join(" ")} ${t}`}else{const e=d.map(t);g=e.shift();for(const t of e)g+=t?`\n${a}${t}`:"\n"}return this.comment?(g+="\n"+this.comment.replace(/^/gm,`${a}#`),s&&s()):h&&i&&i(),g}}function Hn(e){let t=e instanceof Kn?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}An._defineProperty(Gn,"maxFlowStringSingleLineLength",60);class zn extends Gn{add(e){this.items.push(e)}delete(e){const t=Hn(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=Hn(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof Kn?r.value:r}has(e){const t=Hn(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=Hn(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(Vn(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 Zn extends Qn{constructor(e,t=null){super(),this.key=e,this.value=t,this.type=Zn.Type.PAIR}get commentBefore(){return this.key instanceof Qn?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new Kn(null)),!(this.key instanceof Qn)){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=Vn(this.key,"",e);if(t instanceof Map){const r=Vn(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 Qn&&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),o=Vn(this.value,r,e);r in t?Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[r]=o}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:r,indentSeq:o,simpleKeys:s}=e.doc.options;let{key:i,value:a}=this,c=i instanceof Qn&&i.comment;if(s){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(i instanceof Gn){throw new Error("With simple keys, collection cannot be used as a key value")}}let l=!s&&(!i||c||(i instanceof Qn?i instanceof Gn||i.type===An.Type.BLOCK_FOLDED||i.type===An.Type.BLOCK_LITERAL:"object"==typeof i));const{doc:u,indent:f,indentStep:h,stringify:p}=e;e=Object.assign({},e,{implicitKey:!l,indent:f+h});let d=!1,g=p(i,e,(()=>c=null),(()=>d=!0));if(g=Wn(g,e.indent,c),!l&&g.length>1024){if(s)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");l=!0}if(e.allNullValues&&!s)return this.comment?(g=Wn(g,e.indent,this.comment),t&&t()):d&&!c&&n&&n(),e.inFlow&&!l?g:`? ${g}`;g=l?`? ${g}\n${f}:`:`${g}:`,this.comment&&(g=Wn(g,e.indent,this.comment),t&&t());let m="",y=null;if(a instanceof Qn){if(a.spaceBefore&&(m="\n"),a.commentBefore){m+=`\n${a.commentBefore.replace(/^/gm,`${e.indent}#`)}`}y=a.comment}else a&&"object"==typeof a&&(a=u.schema.createNode(a,!0));e.implicitKey=!1,!l&&!this.comment&&a instanceof Kn&&(e.indentAtStart=g.length+1),d=!1,!o&&r>=2&&!e.inFlow&&!l&&a instanceof zn&&a.type!==An.Type.FLOW_SEQ&&!a.tag&&!u.anchors.getName(a)&&(e.indent=e.indent.substr(2));const v=p(a,e,(()=>y=null),(()=>d=!0));let _=" ";if(m||this.comment)_=`${m}\n${e.indent}`;else if(!l&&a instanceof Gn){("["===v[0]||"{"===v[0])&&!v.includes("\n")||(_=`\n${e.indent}`)}else"\n"===v[0]&&(_="");return d&&!y&&n&&n(),Wn(g+_+v,e.indent,y)}}An._defineProperty(Zn,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const Xn=(e,t)=>{if(e instanceof er){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof Gn){let n=0;for(const r of e.items){const e=Xn(r,t);e>n&&(n=e)}return n}if(e instanceof Zn){const n=Xn(e.key,t),r=Xn(e.value,t);return Math.max(n,r)}return 1};class er extends Qn{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:o,inStringifyKey:s}){let i=Object.keys(n).find((e=>n[e]===t));if(!i&&s&&(i=r.anchors.getName(t)||r.anchors.newName()),i)return`*${i}${o?" ":""}`;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=An.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return Vn(this.source,e,t);const{anchors:n,maxAliasCount:r}=t,o=n.get(this.source);if(!o||void 0===o.res){const e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new An.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=Xn(this.source,n)),o.count*o.aliasCount>r)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new An.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return o.res}toString(e){return er.stringify(this,e)}}function tr(e,t){const n=t instanceof Kn?t.value:t;for(const r of e)if(r instanceof Zn){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}An._defineProperty(er,"default",!0);class nr extends Gn{add(e,t){e?e instanceof Zn||(e=new Zn(e.key||e,e.value)):e=new Zn(e);const n=tr(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=tr(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=tr(this.items,e),r=n&&n.value;return!t&&r instanceof Kn?r.value:r}has(e){return!!tr(this.items,e)}set(e,t){this.add(new Zn(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 Zn))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 rr extends Zn{constructor(e){if(e instanceof Zn){let t=e.value;t instanceof zn||(t=new zn,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new Kn("<<"),new zn);this.type=Zn.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof nr))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 or={defaultType:An.Type.BLOCK_LITERAL,lineWidth:76},sr={defaultType:An.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function ir(e,t,n){for(const{format:n,test:r,resolve:o}of t)if(r){const t=e.match(r);if(t){let e=o.apply(null,t);return e instanceof Kn||(e=new Kn(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new Kn(e)}const ar="flow",cr="block",lr="quoted",ur=(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 fr(e,t,n,{indentAtStart:r,lineWidth:o=80,minContentWidth:s=20,onFold:i,onOverflow:a}){if(!o||o<0)return e;const c=Math.max(1+s,1+o-t.length);if(e.length<=c)return e;const l=[],u={};let f,h,p=o-t.length;"number"==typeof r&&(r>o-Math.max(2,s)?l.push(0):p=o-r);let d,g=!1,m=-1,y=-1,v=-1;for(n===cr&&(m=ur(e,m),-1!==m&&(p=m+c));d=e[m+=1];){if(n===lr&&"\\"===d){switch(y=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}v=m}if("\n"===d)n===cr&&(m=ur(e,m)),p=m+c,f=void 0;else{if(" "===d&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(f=m)}if(m>=p)if(f)l.push(f),p=f+c,f=void 0;else if(n===lr){for(;" "===h||"\t"===h;)h=d,d=e[m+=1],g=!0;const t=m>v+1?m-2:y-1;if(u[t])return e;l.push(t),u[t]=!0,p=t+c,f=void 0}else g=!0}h=d}if(g&&a&&a(),0===l.length)return e;i&&i();let _=e.slice(0,l[0]);for(let r=0;r<l.length;++r){const o=l[r],s=l[r+1]||e.length;0===o?_=`\n${t}${e.slice(0,s)}`:(n===lr&&u[o]&&(_+=`${e[o]}\\`),_+=`\n${t}${e.slice(o+1,s)}`)}return _}const hr=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},sr.fold):sr.fold,pr=e=>/^(%|---|\.\.\.)/m.test(e);function dr(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:o}=sr.doubleQuoted,s=JSON.stringify(e);if(r)return s;const i=t.indent||(pr(e)?" ":"");let a="",c=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(a+=s.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{a+=s.slice(c,e);const t=s.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+=s.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<o)e+=1;else{for(a+=s.slice(c,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)a+="\n",e+=2;a+=i," "===s[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+s.slice(c):s,n?a:fr(a,i,lr,hr(t))}function gr(e,t){if(t.implicitKey){if(/\n/.test(e))return dr(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return dr(e,t);const n=t.indent||(pr(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:fr(r,n,ar,hr(t))}function mr({comment:e,type:t,value:n},r,o,s){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return dr(n,r);const i=r.indent||(r.forceBlockIndent||pr(n)?" ":""),a=i?"2":"1",c=t!==An.Type.BLOCK_FOLDED&&(t===An.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,o=e.length;if(o<=r)return!1;for(let t=0,n=0;t<o;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,o-n<=r)return!1}return!0}(n,sr.fold.lineWidth,i.length));let l=c?"|":">";if(!n)return l+"\n";let u="",f="";if(n=n.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":n!==e&&t===e.length-1||(l+="+",s&&s()),f=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=a);const t=e.match(/ +$/);return t?(u=e.slice(0,-t[0].length),t[0]):(u=e,"")})),f&&(f=f.replace(/\n+(?!\n|$)/g,`$&${i}`)),u&&(u=u.replace(/\n+/g,`$&${i}`)),e&&(l+=" #"+e.replace(/ ?[\r\n]+/g," "),o&&o()),!n)return`${l}${a}\n${i}${f}`;if(c)return n=n.replace(/\n+/g,`$&${i}`),`${l}\n${i}${u}${n}${f}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${i}`);const h=fr(`${u}${n}${f}`,i,cr,sr.fold);return`${l}\n${i}${h}`}function yr(e,t){let n,r,o;switch(t.type){case An.Type.FLOW_MAP:n="}",r="flow map";break;case An.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:return void e.push(new An.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!==An.Type.COMMENT){o=n;break}}if(o&&o.char!==n){const s=`Expected ${r} to end with ${n}`;let i;"number"==typeof o.offset?(i=new An.YAMLSemanticError(t,s),i.offset=o.offset+1):(i=new An.YAMLSemanticError(o,s),o.range&&o.range.end&&(i.offset=o.range.end-o.range.start)),e.push(i)}}function vr(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 An.YAMLSemanticError(t,n))}}function _r(e,t){const n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new An.YAMLSemanticError(e,`The "${r}" key is too long`)}function wr(e,t){for(const{afterKey:n,before:r,comment:o}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===o?!n&&t.commentBefore||(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+o:t.commentBefore=o):void 0!==o&&(e.comment?e.comment+="\n"+o:e.comment=o)}}function br(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 Er(e,t){const{tag:n,type:r}=t;let o=!1;if(n){const{handle:r,suffix:s,verbatim:i}=n;if(i){if("!"!==i&&"!!"!==i)return i;const n=`Verbatim tags aren't resolved, so ${i} is invalid.`;e.errors.push(new An.YAMLSemanticError(t,n))}else if("!"!==r||s)try{return function(e,t){const{handle:n,suffix:r}=t.tag;let o=e.tagPrefixes.find((e=>e.handle===n));if(!o){const r=e.getDefaults().tagPrefixes;if(r&&(o=r.find((e=>e.handle===n))),!o)throw new An.YAMLSemanticError(t,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new An.YAMLSemanticError(t,`The ${n} tag has no suffix.`);if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===r[0])return e.warnings.push(new An.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){const e=r.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${r}`}}return o.prefix+decodeURIComponent(r)}(e,t)}catch(t){e.errors.push(t)}else o=!0}switch(r){case An.Type.BLOCK_FOLDED:case An.Type.BLOCK_LITERAL:case An.Type.QUOTE_DOUBLE:case An.Type.QUOTE_SINGLE:return An.defaultTags.STR;case An.Type.FLOW_MAP:case An.Type.MAP:return An.defaultTags.MAP;case An.Type.FLOW_SEQ:case An.Type.SEQ:return An.defaultTags.SEQ;case An.Type.PLAIN:return o?An.defaultTags.STR:null;default:return null}}function Sr(e,t,n){const{tags:r}=e.schema,o=[];for(const s of r)if(s.tag===n){if(!s.test){const n=s.resolve(e,t);return n instanceof Gn?n:new Kn(n)}o.push(s)}const s=br(e,t);return"string"==typeof s&&o.length>0?ir(s,o,r.scalarFallback):null}function Or(e,t,n){try{const r=Sr(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 r=function({type:e}){switch(e){case An.Type.FLOW_MAP:case An.Type.MAP:return An.defaultTags.MAP;case An.Type.FLOW_SEQ:case An.Type.SEQ:return An.defaultTags.SEQ;default:return An.defaultTags.STR}}(t);if(!r)throw new Error(`The tag ${n} is unavailable`);const o=`The tag ${n} is unavailable, falling back to ${r}`;e.warnings.push(new An.YAMLWarning(t,o));const s=Sr(e,t,r);return s.tag=n,s}catch(n){const r=new An.YAMLReferenceError(t,n.message);return r.stack=n.stack,e.errors.push(r),null}}function Ar(e,t){const n={before:[],after:[]};let r=!1,o=!1;const s=(e=>{if(!e)return!1;const{type:t}=e;return t===An.Type.MAP_KEY||t===An.Type.MAP_VALUE||t===An.Type.SEQ_ITEM})(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:i,end:a}of s)switch(t.context.src[i]){case An.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(i)){const n="Comments must be separated from other tokens by white space characters";e.push(new An.YAMLSemanticError(t,n))}const{header:r,valueRange:o}=t;(o&&(i>o.start||r&&i>r.start)?n.after:n.before).push(t.context.src.slice(i+1,a));break}case An.Char.ANCHOR:if(r){const n="A node can have at most one anchor";e.push(new An.YAMLSemanticError(t,n))}r=!0;break;case An.Char.TAG:if(o){const n="A node can have at most one tag";e.push(new An.YAMLSemanticError(t,n))}o=!0}return{comments:n,hasAnchor:r,hasTag:o}}function Mr(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:r,hasTag:o}=Ar(e.errors,t);if(r){const{anchors:n}=e,r=t.anchor,o=n.getNode(r);o&&(n.map[n.newName(r)]=o),n.map[r]=t}if(t.type===An.Type.ALIAS&&(r||o)){const n="An alias node must not specify any properties";e.errors.push(new An.YAMLSemanticError(t,n))}const s=function(e,t){const{anchors:n,errors:r,schema:o}=e;if(t.type===An.Type.ALIAS){const e=t.rawValue,o=n.getNode(e);if(!o){const n=`Aliased anchor not found: ${e}`;return r.push(new An.YAMLReferenceError(t,n)),null}const s=new er(o);return n._cstAliases.push(s),s}const s=Er(e,t);if(s)return Or(e,t,s);if(t.type!==An.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;return r.push(new An.YAMLSyntaxError(t,e)),null}try{return ir(br(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(s){s.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(s.cstNode=t),e.options.keepNodeTypes&&(s.type=t.type);const r=n.before.join("\n");r&&(s.commentBefore=s.commentBefore?`${s.commentBefore}\n${r}`:r);const o=n.after.join("\n");o&&(s.comment=s.comment?`${s.comment}\n${o}`:o)}return t.resolved=s}function Lr(e,t){if(!(({context:{lineStart:e,node:t,src:n},props:r})=>{if(0===r.length)return!1;const{start:o}=r[0];if(t&&o>t.valueRange.start)return!1;if(n[o]!==An.Char.COMMENT)return!1;for(let t=e;t<o;++t)if("\n"===n[t])return!1;return!0})(e))return;const n=e.getPropValue(0,An.Char.COMMENT,!0);let r=!1;const o=t.value.commentBefore;if(o&&o.startsWith(n))t.value.commentBefore=o.substr(n.length+1),r=!0;else{const o=t.value.comment;!e.node&&o&&o.startsWith(n)&&(t.value.comment=o.substr(n.length+1),r=!0)}r&&(t.comment=n)}var Nr={Alias:er,Collection:Gn,Merge:rr,Node:Qn,Pair:Zn,Scalar:Kn,YAMLMap:nr,YAMLSeq:zn,addComment:Wn,binaryOptions:or,boolOptions:{trueStr:"true",falseStr:"false"},findPair:tr,intOptions:{asBigInt:!1},isEmptyPath:Jn,nullOptions:{nullStr:"null"},resolveMap:function(e,t){if(t.type!==An.Type.MAP&&t.type!==An.Type.FLOW_MAP){const n=`A ${t.type} node cannot be resolved as a mapping`;return e.errors.push(new An.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===An.Type.FLOW_MAP?function(e,t){const n=[],r=[];let o,s=!1,i="{";for(let a=0;a<t.items.length;++a){const c=t.items[a];if("string"==typeof c.char){const{char:n,offset:l}=c;if("?"===n&&void 0===o&&!s){s=!0,i=":";continue}if(":"===n){if(void 0===o&&(o=null),":"===i){i=",";continue}}else if(s&&(void 0===o&&","!==n&&(o=null),s=!1),void 0!==o&&(r.push(new Zn(o)),o=void 0,","===n)){i=":";continue}if("}"===n){if(a===t.items.length-1)continue}else if(n===i){i=":";continue}const u=`Flow map contains an unexpected ${n}`,f=new An.YAMLSyntaxError(t,u);f.offset=l,e.errors.push(f)}else c.type===An.Type.BLANK_LINE?n.push({afterKey:!!o,before:r.length}):c.type===An.Type.COMMENT?(vr(e.errors,c),n.push({afterKey:!!o,before:r.length,comment:c.comment})):void 0===o?(","===i&&e.errors.push(new An.YAMLSemanticError(c,"Separator , missing in flow map")),o=Mr(e,c)):(","!==i&&e.errors.push(new An.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new Zn(o,Mr(e,c))),o=void 0,s=!1)}yr(e.errors,t),void 0!==o&&r.push(new Zn(o));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];let o,s=null;for(let i=0;i<t.items.length;++i){const a=t.items[i];switch(a.type){case An.Type.BLANK_LINE:n.push({afterKey:!!o,before:r.length});break;case An.Type.COMMENT:n.push({afterKey:!!o,before:r.length,comment:a.comment});break;case An.Type.MAP_KEY:void 0!==o&&r.push(new Zn(o)),a.error&&e.errors.push(a.error),o=Mr(e,a.node),s=null;break;case An.Type.MAP_VALUE:{if(void 0===o&&(o=null),a.error&&e.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===An.Type.MAP&&!a.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new An.YAMLSemanticError(a.node,t))}let n=a.node;if(!n&&a.props.length>0){n=new An.PlainValue(An.Type.PLAIN,[]),n.context={parent:a,src:a.context.src};const e=a.range.start+1;if(n.range={start:e,end:e},n.valueRange={start:e,end:e},"number"==typeof a.range.origStart){const e=a.range.origStart+1;n.range.origStart=n.range.origEnd=e,n.valueRange.origStart=n.valueRange.origEnd=e}}const i=new Zn(o,Mr(e,n));Lr(a,i),r.push(i),o&&"number"==typeof s&&a.range.start>s+1024&&e.errors.push(_r(t,o)),o=void 0,s=null}break;default:void 0!==o&&r.push(new Zn(o)),o=Mr(e,a),s=a.range.start,a.error&&e.errors.push(a.error);e:for(let n=i+1;;++n){const r=t.items[n];switch(r&&r.type){case An.Type.BLANK_LINE:case An.Type.COMMENT:continue e;case An.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new An.YAMLSemanticError(a,t));break e}}}if(a.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new An.YAMLSemanticError(a,t))}}}void 0!==o&&r.push(new Zn(o));return{comments:n,items:r}}(e,t),o=new nr;o.items=r,wr(o,n);let s=!1;for(let n=0;n<r.length;++n){const{key:o}=r[n];if(o instanceof Gn&&(s=!0),e.schema.merge&&o&&"<<"===o.value){r[n]=new rr(r[n]);const o=r[n].value.items;let s=null;o.some((e=>{if(e instanceof er){const{type:t}=e.source;return t!==An.Type.MAP&&t!==An.Type.FLOW_MAP&&(s="Merge nodes aliases can only point to maps")}return s="Merge nodes can only have Alias nodes as values"})),s&&e.errors.push(new An.YAMLSemanticError(t,s))}else for(let s=n+1;s<r.length;++s){const{key:n}=r[s];if(o===n||o&&n&&Object.prototype.hasOwnProperty.call(o,"value")&&o.value===n.value){const n=`Map keys must be unique; "${o}" is repeated`;e.errors.push(new An.YAMLSemanticError(t,n));break}}}if(s&&!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 An.YAMLWarning(t,n))}return t.resolved=o,o},resolveNode:Mr,resolveSeq:function(e,t){if(t.type!==An.Type.SEQ&&t.type!==An.Type.FLOW_SEQ){const n=`A ${t.type} node cannot be resolved as a sequence`;return e.errors.push(new An.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===An.Type.FLOW_SEQ?function(e,t){const n=[],r=[];let o,s=!1,i=null,a="[",c=null;for(let l=0;l<t.items.length;++l){const u=t.items[l];if("string"==typeof u.char){const{char:n,offset:f}=u;if(":"===n||!s&&void 0===o||(s&&void 0===o&&(o=a?r.pop():null),r.push(new Zn(o)),s=!1,o=void 0,i=null),n===a)a=null;else if(a||"?"!==n){if("["!==a&&":"===n&&void 0===o){if(","===a){if(o=r.pop(),o instanceof Zn){const n="Chaining flow sequence pairs is invalid",r=new An.YAMLSemanticError(t,n);r.offset=f,e.errors.push(r)}if(!s&&"number"==typeof i){const n=u.range?u.range.start:u.offset;n>i+1024&&e.errors.push(_r(t,o));const{src:r}=c.context;for(let t=i;t<n;++t)if("\n"===r[t]){const t="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new An.YAMLSemanticError(c,t));break}}}else o=null;i=null,s=!1,a=null}else if("["===a||"]"!==n||l<t.items.length-1){const r=`Flow sequence contains an unexpected ${n}`,o=new An.YAMLSyntaxError(t,r);o.offset=f,e.errors.push(o)}}else s=!0}else if(u.type===An.Type.BLANK_LINE)n.push({before:r.length});else if(u.type===An.Type.COMMENT)vr(e.errors,u),n.push({comment:u.comment,before:r.length});else{if(a){const t=`Expected a ${a} in flow sequence`;e.errors.push(new An.YAMLSemanticError(u,t))}const t=Mr(e,u);void 0===o?(r.push(t),c=u):(r.push(new Zn(o,t)),o=void 0),i=u.range.start,a=","}}yr(e.errors,t),void 0!==o&&r.push(new Zn(o));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];for(let o=0;o<t.items.length;++o){const s=t.items[o];switch(s.type){case An.Type.BLANK_LINE:n.push({before:r.length});break;case An.Type.COMMENT:n.push({comment:s.comment,before:r.length});break;case An.Type.SEQ_ITEM:if(s.error&&e.errors.push(s.error),r.push(Mr(e,s.node)),s.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new An.YAMLSemanticError(s,t))}break;default:s.error&&e.errors.push(s.error),e.errors.push(new An.YAMLSyntaxError(s,`Unexpected ${s.type} node in sequence`))}}return{comments:n,items:r}}(e,t),o=new zn;if(o.items=r,wr(o,n),!e.options.mapAsMap&&r.some((e=>e instanceof Zn&&e.key instanceof Gn))){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 An.YAMLWarning(t,n))}return t.resolved=o,o},resolveString:br,strOptions:sr,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 o=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o},stringifyString:function(e,t,n,r){const{defaultType:o}=sr,{implicitKey:s,inFlow:i}=t;let{type:a,value:c}=e;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));const l=o=>{switch(o){case An.Type.BLOCK_FOLDED:case An.Type.BLOCK_LITERAL:return mr(e,t,n,r);case An.Type.QUOTE_DOUBLE:return dr(c,t);case An.Type.QUOTE_SINGLE:return gr(c,t);case An.Type.PLAIN:return function(e,t,n,r){const{comment:o,type:s,value:i}=e,{actualString:a,implicitKey:c,indent:l,inFlow:u}=t;if(c&&/[\n[\]{},]/.test(i)||u&&/[[\]{},]/.test(i))return dr(i,t);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return c||u||-1===i.indexOf("\n")?-1!==i.indexOf('"')&&-1===i.indexOf("'")?gr(i,t):dr(i,t):mr(e,t,n,r);if(!c&&!u&&s!==An.Type.PLAIN&&-1!==i.indexOf("\n"))return mr(e,t,n,r);if(""===l&&pr(i))return t.forceBlockIndent=!0,mr(e,t,n,r);const f=i.replace(/\n+/g,`$&\n${l}`);if(a){const{tags:e}=t.doc.schema;if("string"!=typeof ir(f,e,e.scalarFallback).value)return dr(i,t)}const h=c?f:fr(f,l,ar,hr(t));return!o||u||-1===h.indexOf("\n")&&-1===o.indexOf("\n")?h:(n&&n(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(h,l,o))}(e,t,n,r);default:return null}};a!==An.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?a=An.Type.QUOTE_DOUBLE:!s&&!i||a!==An.Type.BLOCK_FOLDED&&a!==An.Type.BLOCK_LITERAL||(a=An.Type.QUOTE_DOUBLE);let u=l(a);if(null===u&&(u=l(o),null===u))throw new Error(`Unsupported default string type ${o}`);return u},toJSON:Vn},Tr=void 0!==Tr?Tr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Pr=[],Cr=[],xr="undefined"!=typeof Uint8Array?Uint8Array:Array,Rr=!1;function Ir(){Rr=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)Pr[t]=e[t],Cr[e.charCodeAt(t)]=t;Cr["-".charCodeAt(0)]=62,Cr["_".charCodeAt(0)]=63}function kr(e,t,n){for(var r,o,s=[],i=t;i<n;i+=3)r=(e[i]<<16)+(e[i+1]<<8)+e[i+2],s.push(Pr[(o=r)>>18&63]+Pr[o>>12&63]+Pr[o>>6&63]+Pr[63&o]);return s.join("")}function Br(e){var t;Rr||Ir();for(var n=e.length,r=n%3,o="",s=[],i=16383,a=0,c=n-r;a<c;a+=i)s.push(kr(e,a,a+i>c?c:a+i));return 1===r?(t=e[n-1],o+=Pr[t>>2],o+=Pr[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=Pr[t>>10],o+=Pr[t>>4&63],o+=Pr[t<<2&63],o+="="),s.push(o),s.join("")}function Yr(e,t,n,r,o){var s,i,a=8*o-r-1,c=(1<<a)-1,l=c>>1,u=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+e[t+f],f+=h,u-=8);for(i=s&(1<<-u)-1,s>>=-u,u+=r;u>0;i=256*i+e[t+f],f+=h,u-=8);if(0===s)s=1-l;else{if(s===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,r),s-=l}return(p?-1:1)*i*Math.pow(2,s-r)}function $r(e,t,n,r,o,s){var i,a,c,l=8*s-o-1,u=(1<<l)-1,f=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(i++,c/=2),i+f>=u?(a=0,i=u):i+f>=1?(a=(t*c-1)*Math.pow(2,o),i+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(i=i<<o|a,l+=o;l>0;e[n+p]=255&i,p+=d,i/=256,l-=8);e[n+p-d]|=128*g}var jr={}.toString,Dr=Array.isArray||function(e){return"[object Array]"==jr.call(e)};function Ur(){return Wr.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Fr(e,t){if(Ur()<t)throw new RangeError("Invalid typed array length");return Wr.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Wr.prototype:(null===e&&(e=new Wr(t)),e.length=t),e}function Wr(e,t,n){if(!(Wr.TYPED_ARRAY_SUPPORT||this instanceof Wr))return new Wr(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Kr(this,e)}return Qr(this,e,t,n)}function Qr(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);Wr.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Wr.prototype:e=qr(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!Wr.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Hr(t,n),o=(e=Fr(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(Gr(t)){var n=0|Jr(t.length);return 0===(e=Fr(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?Fr(e,0):qr(e,t);if("Buffer"===t.type&&Dr(t.data))return qr(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Vr(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Kr(e,t){if(Vr(t),e=Fr(e,t<0?0:0|Jr(t)),!Wr.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function qr(e,t){var n=t.length<0?0:0|Jr(t.length);e=Fr(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function Jr(e){if(e>=Ur())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ur().toString(16)+" bytes");return 0|e}function Gr(e){return!(null==e||!e._isBuffer)}function Hr(e,t){if(Gr(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Oo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ao(e).length;default:if(r)return Oo(e).length;t=(""+t).toLowerCase(),r=!0}}function zr(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ho(this,t,n);case"utf8":case"utf-8":return co(this,t,n);case"ascii":return uo(this,t,n);case"latin1":case"binary":return fo(this,t,n);case"base64":return ao(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return po(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Zr(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Xr(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=Wr.from(t,r)),Gr(t))return 0===t.length?-1:eo(e,t,n,r,o);if("number"==typeof t)return t&=255,Wr.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):eo(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function eo(e,t,n,r,o){var s,i=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,a/=2,c/=2,n/=2}function l(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var u=-1;for(s=n;s<a;s++)if(l(e,s)===l(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===c)return u*i}else-1!==u&&(s-=s-u),u=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){for(var f=!0,h=0;h<c;h++)if(l(e,s+h)!==l(t,h)){f=!1;break}if(f)return s}return-1}function to(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var i=0;i<r;++i){var a=parseInt(t.substr(2*i,2),16);if(isNaN(a))return i;e[n+i]=a}return i}function no(e,t,n,r){return Mo(Oo(t,e.length-n),e,n,r)}function ro(e,t,n,r){return Mo(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function oo(e,t,n,r){return ro(e,t,n,r)}function so(e,t,n,r){return Mo(Ao(t),e,n,r)}function io(e,t,n,r){return Mo(function(e,t){for(var n,r,o,s=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o=n%256,s.push(o),s.push(r);return s}(t,e.length-n),e,n,r)}function ao(e,t,n){return 0===t&&n===e.length?Br(e):Br(e.slice(t,n))}function co(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var s,i,a,c,l=e[o],u=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(u=l);break;case 2:128==(192&(s=e[o+1]))&&(c=(31&l)<<6|63&s)>127&&(u=c);break;case 3:s=e[o+1],i=e[o+2],128==(192&s)&&128==(192&i)&&(c=(15&l)<<12|(63&s)<<6|63&i)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:s=e[o+1],i=e[o+2],a=e[o+3],128==(192&s)&&128==(192&i)&&128==(192&a)&&(c=(15&l)<<18|(63&s)<<12|(63&i)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,f=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=f}return function(e){var t=e.length;if(t<=lo)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=lo));return n}(r)}Wr.TYPED_ARRAY_SUPPORT=void 0===Tr.TYPED_ARRAY_SUPPORT||Tr.TYPED_ARRAY_SUPPORT,Wr.poolSize=8192,Wr._augment=function(e){return e.__proto__=Wr.prototype,e},Wr.from=function(e,t,n){return Qr(null,e,t,n)},Wr.TYPED_ARRAY_SUPPORT&&(Wr.prototype.__proto__=Uint8Array.prototype,Wr.__proto__=Uint8Array),Wr.alloc=function(e,t,n){return function(e,t,n,r){return Vr(t),t<=0?Fr(e,t):void 0!==n?"string"==typeof r?Fr(e,t).fill(n,r):Fr(e,t).fill(n):Fr(e,t)}(null,e,t,n)},Wr.allocUnsafe=function(e){return Kr(null,e)},Wr.allocUnsafeSlow=function(e){return Kr(null,e)},Wr.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Lo(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Lo(e.slice(0,0))}(e))},Wr.compare=function(e,t){if(!Gr(e)||!Gr(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,s=Math.min(n,r);o<s;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},Wr.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Wr.concat=function(e,t){if(!Dr(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Wr.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=Wr.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!Gr(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},Wr.byteLength=Hr,Wr.prototype._isBuffer=!0,Wr.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Zr(this,t,t+1);return this},Wr.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Zr(this,t,t+3),Zr(this,t+1,t+2);return this},Wr.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Zr(this,t,t+7),Zr(this,t+1,t+6),Zr(this,t+2,t+5),Zr(this,t+3,t+4);return this},Wr.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?co(this,0,e):zr.apply(this,arguments)},Wr.prototype.equals=function(e){if(!Gr(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Wr.compare(this,e)},Wr.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Wr.prototype.compare=function(e,t,n,r,o){if(!Gr(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),a=Math.min(s,i),c=this.slice(r,o),l=e.slice(t,n),u=0;u<a;++u)if(c[u]!==l[u]){s=c[u],i=l[u];break}return s<i?-1:i<s?1:0},Wr.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},Wr.prototype.indexOf=function(e,t,n){return Xr(this,e,t,n,!0)},Wr.prototype.lastIndexOf=function(e,t,n){return Xr(this,e,t,n,!1)},Wr.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return to(this,e,t,n);case"utf8":case"utf-8":return no(this,e,t,n);case"ascii":return ro(this,e,t,n);case"latin1":case"binary":return oo(this,e,t,n);case"base64":return so(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return io(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},Wr.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var lo=4096;function uo(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function fo(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function ho(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",s=t;s<n;++s)o+=So(e[s]);return o}function po(e,t,n){for(var r=e.slice(t,n),o="",s=0;s<r.length;s+=2)o+=String.fromCharCode(r[s]+256*r[s+1]);return o}function go(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function mo(e,t,n,r,o,s){if(!Gr(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function yo(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,s=Math.min(e.length-n,2);o<s;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function vo(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,s=Math.min(e.length-n,4);o<s;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function _o(e,t,n,r,o,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function wo(e,t,n,r,o){return o||_o(e,0,n,4),$r(e,t,n,r,23,4),n+4}function bo(e,t,n,r,o){return o||_o(e,0,n,8),$r(e,t,n,r,52,8),n+8}Wr.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),Wr.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Wr.prototype;else{var o=t-e;n=new Wr(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+e]}return n},Wr.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||go(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r},Wr.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||go(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},Wr.prototype.readUInt8=function(e,t){return t||go(e,1,this.length),this[e]},Wr.prototype.readUInt16LE=function(e,t){return t||go(e,2,this.length),this[e]|this[e+1]<<8},Wr.prototype.readUInt16BE=function(e,t){return t||go(e,2,this.length),this[e]<<8|this[e+1]},Wr.prototype.readUInt32LE=function(e,t){return t||go(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Wr.prototype.readUInt32BE=function(e,t){return t||go(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Wr.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||go(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},Wr.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||go(e,t,this.length);for(var r=t,o=1,s=this[e+--r];r>0&&(o*=256);)s+=this[e+--r]*o;return s>=(o*=128)&&(s-=Math.pow(2,8*t)),s},Wr.prototype.readInt8=function(e,t){return t||go(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Wr.prototype.readInt16LE=function(e,t){t||go(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Wr.prototype.readInt16BE=function(e,t){t||go(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Wr.prototype.readInt32LE=function(e,t){return t||go(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Wr.prototype.readInt32BE=function(e,t){return t||go(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Wr.prototype.readFloatLE=function(e,t){return t||go(e,4,this.length),Yr(this,e,!0,23,4)},Wr.prototype.readFloatBE=function(e,t){return t||go(e,4,this.length),Yr(this,e,!1,23,4)},Wr.prototype.readDoubleLE=function(e,t){return t||go(e,8,this.length),Yr(this,e,!0,52,8)},Wr.prototype.readDoubleBE=function(e,t){return t||go(e,8,this.length),Yr(this,e,!1,52,8)},Wr.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||mo(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,s=0;for(this[t]=255&e;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},Wr.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||mo(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},Wr.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,1,255,0),Wr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Wr.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,2,65535,0),Wr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):yo(this,e,t,!0),t+2},Wr.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,2,65535,0),Wr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):yo(this,e,t,!1),t+2},Wr.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,4,4294967295,0),Wr.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):vo(this,e,t,!0),t+4},Wr.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,4,4294967295,0),Wr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):vo(this,e,t,!1),t+4},Wr.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);mo(this,e,t,n,o-1,-o)}var s=0,i=1,a=0;for(this[t]=255&e;++s<n&&(i*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},Wr.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);mo(this,e,t,n,o-1,-o)}var s=n-1,i=1,a=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},Wr.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,1,127,-128),Wr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Wr.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,2,32767,-32768),Wr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):yo(this,e,t,!0),t+2},Wr.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,2,32767,-32768),Wr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):yo(this,e,t,!1),t+2},Wr.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,4,2147483647,-2147483648),Wr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):vo(this,e,t,!0),t+4},Wr.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||mo(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Wr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):vo(this,e,t,!1),t+4},Wr.prototype.writeFloatLE=function(e,t,n){return wo(this,e,t,!0,n)},Wr.prototype.writeFloatBE=function(e,t,n){return wo(this,e,t,!1,n)},Wr.prototype.writeDoubleLE=function(e,t,n){return bo(this,e,t,!0,n)},Wr.prototype.writeDoubleBE=function(e,t,n){return bo(this,e,t,!1,n)},Wr.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,s=r-n;if(this===e&&n<t&&t<r)for(o=s-1;o>=0;--o)e[o+t]=this[o+n];else if(s<1e3||!Wr.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},Wr.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Wr.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var i=Gr(e)?e:Oo(new Wr(e,r).toString()),a=i.length;for(s=0;s<n-t;++s)this[s+t]=i[s%a]}return this};var Eo=/[^+\/0-9A-Za-z-_]/g;function So(e){return e<16?"0"+e.toString(16):e.toString(16)}function Oo(e,t){var n;t=t||1/0;for(var r=e.length,o=null,s=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&s.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function Ao(e){return function(e){var t,n,r,o,s,i;Rr||Ir();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[a-2]?2:"="===e[a-1]?1:0,i=new xr(3*a/4-s),r=s>0?a-4:a;var c=0;for(t=0,n=0;t<r;t+=4,n+=3)o=Cr[e.charCodeAt(t)]<<18|Cr[e.charCodeAt(t+1)]<<12|Cr[e.charCodeAt(t+2)]<<6|Cr[e.charCodeAt(t+3)],i[c++]=o>>16&255,i[c++]=o>>8&255,i[c++]=255&o;return 2===s?(o=Cr[e.charCodeAt(t)]<<2|Cr[e.charCodeAt(t+1)]>>4,i[c++]=255&o):1===s&&(o=Cr[e.charCodeAt(t)]<<10|Cr[e.charCodeAt(t+1)]<<4|Cr[e.charCodeAt(t+2)]>>2,i[c++]=o>>8&255,i[c++]=255&o),i}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Eo,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Mo(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Lo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function No(){throw new Error("setTimeout has not been defined")}function To(){throw new Error("clearTimeout has not been defined")}var Po=No,Co=To;function xo(e){if(Po===setTimeout)return setTimeout(e,0);if((Po===No||!Po)&&setTimeout)return Po=setTimeout,setTimeout(e,0);try{return Po(e,0)}catch(t){try{return Po.call(null,e,0)}catch(t){return Po.call(this,e,0)}}}"function"==typeof Tr.setTimeout&&(Po=setTimeout),"function"==typeof Tr.clearTimeout&&(Co=clearTimeout);var Ro,Io=[],ko=!1,Bo=-1;function Yo(){ko&&Ro&&(ko=!1,Ro.length?Io=Ro.concat(Io):Bo=-1,Io.length&&$o())}function $o(){if(!ko){var e=xo(Yo);ko=!0;for(var t=Io.length;t;){for(Ro=Io,Io=[];++Bo<t;)Ro&&Ro[Bo].run();Bo=-1,t=Io.length}Ro=null,ko=!1,function(e){if(Co===clearTimeout)return clearTimeout(e);if((Co===To||!Co)&&clearTimeout)return Co=clearTimeout,clearTimeout(e);try{Co(e)}catch(t){try{return Co.call(null,e)}catch(t){return Co.call(this,e)}}}(e)}}function jo(e,t){this.fun=e,this.array=t}jo.prototype.run=function(){this.fun.apply(null,this.array)};function Do(){}var Uo=Do,Fo=Do,Wo=Do,Qo=Do,Vo=Do,Ko=Do,qo=Do;var Jo=Tr.performance||{},Go=Jo.now||Jo.mozNow||Jo.msNow||Jo.oNow||Jo.webkitNow||function(){return(new Date).getTime()};var Ho=new Date;var zo={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Io.push(new jo(e,t)),1!==Io.length||ko||xo($o)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Uo,addListener:Fo,once:Wo,off:Qo,removeListener:Vo,removeAllListeners:Ko,emit:qo,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Go.call(Jo),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ho)/1e3}};const Zo={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=Nr.resolveString(e,t);return Wr.from(n,"base64")},options:Nr.binaryOptions,stringify:({comment:e,type:t,value:n},r,o,s)=>{let i;if(i=n instanceof Wr?n.toString("base64"):Wr.from(n.buffer).toString("base64"),t||(t=Nr.binaryOptions.defaultType),t===An.Type.QUOTE_DOUBLE)n=i;else{const{lineWidth:e}=Nr.binaryOptions,r=Math.ceil(i.length/e),o=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)o[t]=i.substr(n,e);n=o.join(t===An.Type.BLOCK_LITERAL?"\n":" ")}return Nr.stringifyString({comment:e,type:t,value:n},r,o,s)}};function Xo(e,t){const n=Nr.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let r=n.items[e];if(!(r instanceof Nr.Pair)){if(r instanceof Nr.YAMLMap){if(r.items.length>1){const e="Each pair must have its own sequence indicator";throw new An.YAMLSemanticError(t,e)}const e=r.items[0]||new Nr.Pair;r.commentBefore&&(e.commentBefore=e.commentBefore?`${r.commentBefore}\n${e.commentBefore}`:r.commentBefore),r.comment&&(e.comment=e.comment?`${r.comment}\n${e.comment}`:r.comment),r=e}n.items[e]=r instanceof Nr.Pair?r:new Nr.Pair(r)}}return n}function es(e,t,n){const r=new Nr.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const o of t){let t,s;if(Array.isArray(o)){if(2!==o.length)throw new TypeError(`Expected [key, value] tuple: ${o}`);t=o[0],s=o[1]}else if(o&&o instanceof Object){const e=Object.keys(o);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${o}`);t=e[0],s=o[t]}else t=o;const i=e.createPair(t,s,n);r.items.push(i)}return r}const ts={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xo,createNode:es};class ns extends Nr.YAMLSeq{constructor(){super(),An._defineProperty(this,"add",Nr.YAMLMap.prototype.add.bind(this)),An._defineProperty(this,"delete",Nr.YAMLMap.prototype.delete.bind(this)),An._defineProperty(this,"get",Nr.YAMLMap.prototype.get.bind(this)),An._defineProperty(this,"has",Nr.YAMLMap.prototype.has.bind(this)),An._defineProperty(this,"set",Nr.YAMLMap.prototype.set.bind(this)),this.tag=ns.tag}toJSON(e,t){const n=new Map;t&&t.onCreate&&t.onCreate(n);for(const e of this.items){let r,o;if(e instanceof Nr.Pair?(r=Nr.toJSON(e.key,"",t),o=Nr.toJSON(e.value,r,t)):r=Nr.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}}An._defineProperty(ns,"tag","tag:yaml.org,2002:omap");const rs={identify:e=>e instanceof Map,nodeClass:ns,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=Xo(e,t),r=[];for(const{key:e}of n.items)if(e instanceof Nr.Scalar){if(r.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new An.YAMLSemanticError(t,e)}r.push(e.value)}return Object.assign(new ns,n)},createNode:function(e,t,n){const r=es(e,t,n),o=new ns;return o.items=r.items,o}};class os extends Nr.YAMLMap{constructor(){super(),this.tag=os.tag}add(e){const t=e instanceof Nr.Pair?e:new Nr.Pair(e);Nr.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=Nr.findPair(this.items,e);return!t&&n instanceof Nr.Pair?n.key instanceof Nr.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=Nr.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Nr.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")}}An._defineProperty(os,"tag","tag:yaml.org,2002:set");const ss={identify:e=>e instanceof Set,nodeClass:os,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=Nr.resolveMap(e,t);if(!n.hasAllNullValues())throw new An.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new os,n)},createNode:function(e,t,n){const r=new os;for(const o of t)r.items.push(e.createPair(o,null,n));return r}},is=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},as=({value:e})=>{if(isNaN(e)||!isFinite(e))return Nr.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*$/,"")},cs={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)=>is(t,n.replace(/_/g,"")),stringify:as},ls={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)=>is(t,n.replace(/_/g,"")),stringify:as},us={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,o,s,i,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(t,n-1,r,o||0,s||0,i||0,a||0);if(c&&"Z"!==c){let e=is(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function fs(e){const t=void 0!==zo&&zo.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 hs(e,t){if(fs(!1)){const n=void 0!==zo&&zo.emitWarning;n?n(e,t):console.warn(t?`${t}: ${e}`:e)}}const ps={};var ds={binary:Zo,floatTime:ls,intTime:cs,omap:rs,pairs:ts,set:ss,timestamp:us,warn:hs,warnFileDeprecation:function(e){if(fs(!0)){hs(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")}},warnOptionDeprecation:function(e,t){if(!ps[e]&&fs(!0)){ps[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",hs(n,"DeprecationWarning")}}};const gs={createNode:function(e,t,n){const r=new Nr.YAMLMap(e);if(t instanceof Map)for(const[o,s]of t)r.items.push(e.createPair(o,s,n));else if(t&&"object"==typeof t)for(const o of Object.keys(t))r.items.push(e.createPair(o,t[o],n));return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:Nr.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:Nr.resolveMap};const ms={createNode:function(e,t,n){const r=new Nr.YAMLSeq(e);if(t&&t[Symbol.iterator])for(const o of t){const t=e.createNode(o,n.wrapScalars,null,n);r.items.push(t)}return r},default:!0,nodeClass:Nr.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:Nr.resolveSeq},ys={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:Nr.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),Nr.stringifyString(e,t,n,r)),options:Nr.strOptions},vs=[gs,ms,ys],_s=e=>"bigint"==typeof e||Number.isInteger(e),ws=(e,t,n)=>Nr.intOptions.asBigInt?BigInt(e):parseInt(t,n);function bs(e,t,n){const{value:r}=e;return _s(r)&&r>=0?n+r.toString(t):Nr.stringifyNumber(e)}const Es={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Nr.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:Nr.nullOptions,stringify:()=>Nr.nullOptions.nullStr},Ss={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:Nr.boolOptions,stringify:({value:e})=>e?Nr.boolOptions.trueStr:Nr.boolOptions.falseStr},Os={identify:e=>_s(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>ws(e,t,8),options:Nr.intOptions,stringify:e=>bs(e,8,"0o")},As={identify:_s,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>ws(e,e,10),options:Nr.intOptions,stringify:Nr.stringifyNumber},Ms={identify:e=>_s(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>ws(e,t,16),options:Nr.intOptions,stringify:e=>bs(e,16,"0x")},Ls={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:Nr.stringifyNumber},Ns={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()},Ts={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,o=new Nr.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(o.minFractionDigits=r.length),o},stringify:Nr.stringifyNumber},Ps=vs.concat([Es,Ss,Os,As,Ms,Ls,Ns,Ts]),Cs=e=>"bigint"==typeof e||Number.isInteger(e),xs=({value:e})=>JSON.stringify(e),Rs=[gs,ms,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:Nr.resolveString,stringify:xs},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Nr.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:xs},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:xs},{identify:Cs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>Nr.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>Cs(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:xs}];Rs.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};const Is=({value:e})=>e?Nr.boolOptions.trueStr:Nr.boolOptions.falseStr,ks=e=>"bigint"==typeof e||Number.isInteger(e);function Bs(e,t,n){let r=t.replace(/_/g,"");if(Nr.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 o=parseInt(r,n);return"-"===e?-1*o:o}function Ys(e,t,n){const{value:r}=e;if(ks(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return Nr.stringifyNumber(e)}const $s=vs.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new Nr.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:Nr.nullOptions,stringify:()=>Nr.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:Nr.boolOptions,stringify:Is},{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:Nr.boolOptions,stringify:Is},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>Bs(t,n,2),stringify:e=>Ys(e,2,"0b")},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>Bs(t,n,8),stringify:e=>Ys(e,8,"0")},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>Bs(t,n,10),stringify:Nr.stringifyNumber},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>Bs(t,n,16),stringify:e=>Ys(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:Nr.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 Nr.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:Nr.stringifyNumber}],ds.binary,ds.omap,ds.pairs,ds.set,ds.intTime,ds.floatTime,ds.timestamp),js={core:Ps,failsafe:vs,json:Rs,yaml11:$s},Ds={binary:ds.binary,bool:Ss,float:Ts,floatExp:Ns,floatNaN:Ls,floatTime:ds.floatTime,int:As,intHex:Ms,intOct:Os,intTime:ds.intTime,map:gs,null:Es,omap:ds.omap,pairs:ds.pairs,seq:ms,set:ds.set,timestamp:ds.timestamp};function Us(e,t,n){if(e instanceof Nr.Node)return e;const{defaultPrefix:r,onTagObj:o,prevObjects:s,schema:i,wrapScalars:a}=n;t&&t.startsWith("!!")&&(t=r+t.slice(2));let c=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,i.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return a?new Nr.Scalar(e):e;c=e instanceof Map?gs:e[Symbol.iterator]?ms:gs}o&&(o(c),delete n.onTagObj);const l={value:void 0,node:void 0};if(e&&"object"==typeof e&&s){const t=s.get(e);if(t){const e=new Nr.Alias(t);return n.aliasNodes.push(e),e}l.value=e,s.set(e,l)}return l.node=c.createNode?c.createNode(n.schema,e,n):a?new Nr.Scalar(e):e,t&&l.node instanceof Nr.Node&&(l.node.tag=t),l.node}const Fs=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Ws{constructor({customTags:e,merge:t,schema:n,sortMapEntries:r,tags:o}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===r?Fs:r||null,!e&&o&&ds.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let o=e[r.replace(/\W/g,"")];if(!o){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)o=o.concat(e);else"function"==typeof n&&(o=n(o.slice()));for(let e=0;e<o.length;++e){const n=o[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}`)}o[e]=r}}return o}(js,Ds,e||o,n)}createNode(e,t,n,r){const o={defaultPrefix:Ws.defaultPrefix,schema:this,wrapScalars:t};return Us(e,n,r?Object.assign(r,o):o)}createPair(e,t,n){n||(n={wrapScalars:!0});const r=this.createNode(e,n.wrapScalars,null,n),o=this.createNode(t,n.wrapScalars,null,n);return new Nr.Pair(r,o)}}An._defineProperty(Ws,"defaultPrefix",An.defaultTagPrefix),An._defineProperty(Ws,"defaultTags",An.defaultTags);var Qs={Schema:Ws};const Vs={get binary(){return Nr.binaryOptions},set binary(e){Object.assign(Nr.binaryOptions,e)},get bool(){return Nr.boolOptions},set bool(e){Object.assign(Nr.boolOptions,e)},get int(){return Nr.intOptions},set int(e){Object.assign(Nr.intOptions,e)},get null(){return Nr.nullOptions},set null(e){Object.assign(Nr.nullOptions,e)},get str(){return Nr.strOptions},set str(e){Object.assign(Nr.strOptions,e)}},Ks={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:An.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:An.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:An.defaultTagPrefix}]}};function qs(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 Js(e,t,n,r){const{anchors:o,schema:s}=t.doc;let i;if(!(e instanceof Nr.Node)){const t={aliasNodes:[],onTagObj:e=>i=e,prevObjects:new Map};e=s.createNode(e,!0,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=o.getName(e.source);t||(t=o.newName(),o.map[t]=e.source)}}if(e instanceof Nr.Pair)return e.toString(t,n,r);i||(i=function(e,t){if(t instanceof Nr.Alias)return Nr.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 Nr.Scalar){r=t.value;const o=e.filter((e=>e.identify&&e.identify(r)||e.class&&r instanceof e.class));n=o.find((e=>e.format===t.format))||o.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}(s.tags,e));const a=function(e,t,{anchors:n,doc:r}){const o=[],s=r.anchors.getName(e);return s&&(n[s]=e,o.push(`&${s}`)),e.tag?o.push(qs(r,e.tag)):t.default||o.push(qs(r,t.tag)),o.join(" ")}(e,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart||0)+a.length+1);const c="function"==typeof i.stringify?i.stringify(e,t,n,r):e instanceof Nr.Scalar?Nr.stringifyString(e,t,n,r):e.toString(t,n,r);return a?e instanceof Nr.Scalar||"{"===c[0]||"["===c[0]?`${a} ${c}`:`${a}\n${t.indent}${c}`:c}class Gs{static validAnchorNode(e){return e instanceof Nr.Scalar||e instanceof Nr.YAMLSeq||e instanceof Nr.YAMLMap}constructor(e){An._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new Nr.Alias(e)}createMergePair(...e){const t=new Nr.Merge;return t.value.items=e.map((e=>{if(e instanceof Nr.Alias){if(e.source instanceof Nr.YAMLMap)return e}else if(e instanceof Nr.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&&!Gs.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 Hs=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof Nr.Collection?(n&&(t[n]=!0),e.items.forEach((e=>Hs(e,t)))):e instanceof Nr.Pair?(Hs(e.key,t),Hs(e.value,t)):e instanceof Nr.Scalar&&n&&(t[n]=!0)}return t};function zs({tagPrefixes:e},t){const[n,r]=t.parameters;if(!n||!r){const e="Insufficient parameters given for %TAG directive";throw new An.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 An.YAMLSemanticError(t,e)}return{handle:n,prefix:r}}function Zs(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 An.YAMLSemanticError(t,e)}if(!Ks[n]){const r=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${n}`;e.warnings.push(new An.YAMLWarning(t,r))}return n}function Xs(e){if(e instanceof Nr.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class ei{constructor(e){this.anchors=new Gs(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 Xs(this.contents),this.contents.add(e)}addIn(e,t){Xs(this.contents),this.contents.addIn(e,t)}delete(e){return Xs(this.contents),this.contents.delete(e)}deleteIn(e){return Nr.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(Xs(this.contents),this.contents.deleteIn(e))}getDefaults(){return ei.defaults[this.version]||ei.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof Nr.Collection?this.contents.get(e,t):void 0}getIn(e,t){return Nr.isEmptyPath(e)?!t&&this.contents instanceof Nr.Scalar?this.contents.value:this.contents:this.contents instanceof Nr.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof Nr.Collection&&this.contents.has(e)}hasIn(e){return Nr.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof Nr.Collection&&this.contents.hasIn(e)}set(e,t){Xs(this.contents),this.contents.set(e,t)}setIn(e,t){Nr.isEmptyPath(e)?this.contents=t:(Xs(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 Qs.Schema(n)}parse(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");const{directives:n=[],contents:r=[],directivesEndMarker:o,error:s,valueRange:i}=e;if(s&&(s.source||(s.source=this),this.errors.push(s)),function(e,t,n){const r=[];let o=!1;for(const n of t){const{comment:t,name:s}=n;switch(s){case"TAG":try{e.tagPrefixes.push(zs(e,n))}catch(t){e.errors.push(t)}o=!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 An.YAMLSemanticError(n,t))}try{e.version=Zs(e,n)}catch(t){e.errors.push(t)}o=!0;break;default:if(s){const t=`YAML only supports %TAG and %YAML directives, and not %${s}`;e.warnings.push(new An.YAMLWarning(n,t))}}t&&r.push(t)}if(n&&!o&&"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=r.join("\n")||null}(this,n,t),o&&(this.directivesEndMarker=!0),this.range=i?[i.start,i.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let r,o=!1;for(const s of t)if(s.valueRange){if(void 0!==r){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new An.YAMLSyntaxError(s,t));break}const t=Nr.resolveNode(e,s);o&&(t.spaceBefore=!0,o=!1),r=t}else null!==s.comment?(void 0===r?n.before:n.after).push(s.comment):s.type===An.Type.BLANK_LINE&&(o=!0,void 0===r&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]));if(e.contents=r||null,r){const t=n.before.join("\n");if(t){const e=r instanceof Nr.Collection&&r.items[0]?r.items[0]:r;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,r),this.anchors.resolveNodes(),this.options.prettyErrors){for(const e of this.errors)e instanceof An.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof An.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=>Object.keys(Hs(e,{})))(this.contents).filter((e=>0!==e.indexOf(Qs.Schema.defaultPrefix)))}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:o}=this.options,s=n&&("string"!=typeof e||!(this.contents instanceof Nr.Scalar)),i={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!r,maxAliasCount:o,stringify:Js},a=Object.keys(this.anchors.map);a.length>0&&(i.anchors=new Map(a.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const c=Nr.toJSON(this.contents,e,i);if("function"==typeof t&&i.anchors)for(const{count:e,res:n}of i.anchors.values())t(n,e);return c}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:o})=>{r.some((e=>0===e.indexOf(o)))&&(t.push(`%TAG ${e} ${o}`),n=!0)})),(n||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));const o={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Js};let s=!1,i=null;if(this.contents){this.contents instanceof Nr.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment,i=this.contents.comment);const e=i?null:()=>s=!0,r=Js(this.contents,o,(()=>i=null),e);t.push(Nr.addComment(r,"",i))}else void 0!==this.contents&&t.push(Js(this.contents,o));return this.comment&&(s&&!i||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}An._defineProperty(ei,"defaults",Ks);var ti={Document:ei,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"},scalarOptions:Vs};class ni extends ti.Document{constructor(e){super(Object.assign({},ti.defaultOptions,e))}}function ri(e,t){const n=Fn.parse(e),r=new ni(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new An.YAMLSemanticError(n[1],e))}return r}var oi={YAML:{createNode:function(e,t=!0,n){void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},ti.Document.defaults[ti.defaultOptions.version],ti.defaultOptions);return new Qs.Schema(r).createNode(e,t,n)},defaultOptions:ti.defaultOptions,Document:ni,parse:function(e,t){const n=ri(e,t);if(n.warnings.forEach((e=>ds.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){const n=[];let r;for(const o of Fn.parse(e)){const e=new ni(t);e.parse(o,r),n.push(e),r=e}return n},parseCST:Fn.parse,parseDocument:ri,scalarOptions:ti.scalarOptions,stringify:function(e,t){const n=new ni(t);return n.contents=e,String(n)}}}.YAML,si={findPair:Nr.findPair,parseMap:Nr.resolveMap,parseSeq:Nr.resolveSeq,stringifyNumber:Nr.stringifyNumber,stringifyString:Nr.stringifyString,toJSON:Nr.toJSON,Type:An.Type,YAMLError:An.YAMLError,YAMLReferenceError:An.YAMLReferenceError,YAMLSemanticError:An.YAMLSemanticError,YAMLSyntaxError:An.YAMLSyntaxError,YAMLWarning:An.YAMLWarning},ii={findPair:si.findPair,toJSON:si.toJSON,parseMap:si.parseMap,parseSeq:si.parseSeq,stringifyNumber:si.stringifyNumber,stringifyString:si.stringifyString,Type:si.Type,YAMLError:si.YAMLError,YAMLReferenceError:si.YAMLReferenceError,YAMLSemanticError:si.YAMLSemanticError,YAMLSyntaxError:si.YAMLSyntaxError,YAMLWarning:si.YAMLWarning},ai=oi.Document,ci=oi.parseCST,li=ii.YAMLError,ui=ii.YAMLSyntaxError,fi=ii.YAMLSemanticError,hi=Object.defineProperty({Document:ai,parseCST:ci,YAMLError:li,YAMLSyntaxError:ui,YAMLSemanticError:fi},"__esModule",{value:!0});var pi=function(e){var t=hi.parseCST(e);en.addOrigRange(t);for(var n=t.map((function(e){return new hi.Document({merge:!1,keepCstNodes:!0}).parse(e)})),r=[],o={text:e,locator:new u.default(e),comments:r,transformOffset:function(e){return Jt.transformOffset(e,o)},transformRange:function(e){return Ht.transformRange(e,o)},transformNode:function(e){return Dt.transformNode(e,o)},transformContent:function(e){return z.transformContent(e,o)}},s=0,i=n;s<i.length;s++)for(var a=0,c=i[s].errors;a<c.length;a++){var l=c[a];if(!(l instanceof hi.YAMLSemanticError&&'Map keys must be unique; "<<" is repeated'===l.message))throw Qt.transformError(l,o)}n.forEach((function(e){return A.removeCstBlankLine(e.cstNode)}));var f=S.createRoot(o.transformRange({origStart:0,origEnd:o.text.length}),n.map(o.transformNode),r);return _.attachComments(f),pn.updatePositions(f),nn.removeFakeNodes(f),f},di=Object.defineProperty({parse:pi},"__esModule",{value:!0}),gi=r((function(e,t){t.__esModule=!0,l.__exportStar(di,t)}));const{hasPragma:mi}=t,{locStart:yi,locEnd:vi}=n;return{parsers:{yaml:{astFormat:"yaml",parse:function(t){const{parse:n}=gi;try{const e=n(t);return delete e.comments,e}catch(t){if(t&&t.position)throw e(t.message,t.position);throw t}},hasPragma:mi,locStart:yi,locEnd:vi}}}}));
|