UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

33 lines (31 loc) 47.1 kB
import{a as i}from"./chunk-AQ6EADP3.mjs";function Jn(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}i(Jn,"getDefaultExportFromCjs");var D={},Oe={},z={},fn;function he(){if(fn)return z;fn=1;function w(h){return typeof h>"u"||h===null}i(w,"isNothing");function E(h){return typeof h=="object"&&h!==null}i(E,"isObject");function O(h){return Array.isArray(h)?h:w(h)?[]:[h]}i(O,"toArray");function N(h,a){if(a){let T=Object.keys(a);for(let o=0,u=T.length;o<u;o+=1){let S=T[o];h[S]=a[S]}}return h}i(N,"extend");function m(h,a){let T="";for(let o=0;o<a;o+=1)T+=h;return T}i(m,"repeat");function C(h){return h===0&&Number.NEGATIVE_INFINITY===1/h}return i(C,"isNegativeZero"),z.isNothing=w,z.isObject=E,z.toArray=O,z.repeat=m,z.isNegativeZero=C,z.extend=N,z}i(he,"requireCommon");var Pe,pn;function de(){if(pn)return Pe;pn=1;function w(O,N){let m="",C=O.reason||"(unknown reason)";return O.mark?(O.mark.name&&(m+='in "'+O.mark.name+'" '),m+="("+(O.mark.line+1)+":"+(O.mark.column+1)+")",!N&&O.mark.snippet&&(m+=` `+O.mark.snippet),C+" "+m):C}i(w,"formatError");function E(O,N){Error.call(this),this.name="YAMLException",this.reason=O,this.mark=N,this.message=w(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return i(E,"YAMLException2"),E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,E.prototype.toString=i(function(N){return this.name+": "+w(this,N)},"toString"),Pe=E,Pe}i(de,"requireException");var De,sn;function Zn(){if(sn)return De;sn=1;let w=he();function E(m,C,h,a,T){let o="",u="",S=Math.floor(T/2)-1;return a-C>S&&(o=" ... ",C=a-S+o.length),h-a>S&&(u=" ...",h=a+S-u.length),{str:o+m.slice(C,h).replace(/\t/g,"\u2192")+u,pos:a-C+o.length}}i(E,"getLine");function O(m,C){return w.repeat(" ",C-m.length)+m}i(O,"padStart");function N(m,C){if(C=Object.create(C||null),!m.buffer)return null;C.maxLength||(C.maxLength=79),typeof C.indent!="number"&&(C.indent=1),typeof C.linesBefore!="number"&&(C.linesBefore=3),typeof C.linesAfter!="number"&&(C.linesAfter=2);let h=/\r?\n|\r|\0/g,a=[0],T=[],o,u=-1;for(;o=h.exec(m.buffer);)T.push(o.index),a.push(o.index+o[0].length),m.position<=o.index&&u<0&&(u=a.length-2);u<0&&(u=a.length-1);let S="",L=Math.min(m.line+C.linesAfter,T.length).toString().length,v=C.maxLength-(C.indent+L+3);for(let F=1;F<=C.linesBefore&&!(u-F<0);F++){let K=E(m.buffer,a[u-F],T[u-F],m.position-(a[u]-a[u-F]),v);S=w.repeat(" ",C.indent)+O((m.line-F+1).toString(),L)+" | "+K.str+` `+S}let $=E(m.buffer,a[u],T[u],m.position,v);S+=w.repeat(" ",C.indent)+O((m.line+1).toString(),L)+" | "+$.str+` `,S+=w.repeat("-",C.indent+L+3+$.pos)+`^ `;for(let F=1;F<=C.linesAfter&&!(u+F>=T.length);F++){let K=E(m.buffer,a[u+F],T[u+F],m.position-(a[u]-a[u+F]),v);S+=w.repeat(" ",C.indent)+O((m.line+F+1).toString(),L)+" | "+K.str+` `}return S.replace(/\n$/,"")}return i(N,"makeSnippet"),De=N,De}i(Zn,"requireSnippet");var He,an;function H(){if(an)return He;an=1;let w=de(),E=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],O=["scalar","sequence","mapping"];function N(C){let h={};return C!==null&&Object.keys(C).forEach(function(a){C[a].forEach(function(T){h[String(T)]=a})}),h}i(N,"compileStyleAliases");function m(C,h){if(h=h||{},Object.keys(h).forEach(function(a){if(E.indexOf(a)===-1)throw new w('Unknown option "'+a+'" is met in definition of "'+C+'" YAML type.')}),this.options=h,this.tag=C,this.kind=h.kind||null,this.resolve=h.resolve||function(){return!0},this.construct=h.construct||function(a){return a},this.instanceOf=h.instanceOf||null,this.predicate=h.predicate||null,this.represent=h.represent||null,this.representName=h.representName||null,this.defaultStyle=h.defaultStyle||null,this.multi=h.multi||!1,this.styleAliases=N(h.styleAliases||null),O.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+C+'" YAML type.')}return i(m,"Type2"),He=m,He}i(H,"requireType");var je,hn;function Mn(){if(hn)return je;hn=1;let w=de(),E=H();function O(C,h){let a=[];return C[h].forEach(function(T){let o=a.length;a.forEach(function(u,S){u.tag===T.tag&&u.kind===T.kind&&u.multi===T.multi&&(o=S)}),a[o]=T}),a}i(O,"compileList");function N(){let C={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function h(a){a.multi?(C.multi[a.kind].push(a),C.multi.fallback.push(a)):C[a.kind][a.tag]=C.fallback[a.tag]=a}i(h,"collectType");for(let a=0,T=arguments.length;a<T;a+=1)arguments[a].forEach(h);return C}i(N,"compileMap");function m(C){return this.extend(C)}return i(m,"Schema2"),m.prototype.extend=i(function(h){let a=[],T=[];if(h instanceof E)T.push(h);else if(Array.isArray(h))T=T.concat(h);else if(h&&(Array.isArray(h.implicit)||Array.isArray(h.explicit)))h.implicit&&(a=a.concat(h.implicit)),h.explicit&&(T=T.concat(h.explicit));else throw new w("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(u){if(!(u instanceof E))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new w("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new w("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),T.forEach(function(u){if(!(u instanceof E))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let o=Object.create(m.prototype);return o.implicit=(this.implicit||[]).concat(a),o.explicit=(this.explicit||[]).concat(T),o.compiledImplicit=O(o,"implicit"),o.compiledExplicit=O(o,"explicit"),o.compiledTypeMap=N(o.compiledImplicit,o.compiledExplicit),o},"extend"),je=m,je}i(Mn,"requireSchema");var Be,dn;function Fn(){if(dn)return Be;dn=1;let w=H();return Be=new w("tag:yaml.org,2002:str",{kind:"scalar",construct:i(function(E){return E!==null?E:""},"construct")}),Be}i(Fn,"requireStr");var Ue,mn;function qn(){if(mn)return Ue;mn=1;let w=H();return Ue=new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:i(function(E){return E!==null?E:[]},"construct")}),Ue}i(qn,"requireSeq");var Ke,gn;function Yn(){if(gn)return Ke;gn=1;let w=H();return Ke=new w("tag:yaml.org,2002:map",{kind:"mapping",construct:i(function(E){return E!==null?E:{}},"construct")}),Ke}i(Yn,"requireMap");var Ge,An;function Pn(){if(An)return Ge;An=1;let w=Mn();return Ge=new w({explicit:[Fn(),qn(),Yn()]}),Ge}i(Pn,"requireFailsafe");var We,yn;function Dn(){if(yn)return We;yn=1;let w=H();function E(m){if(m===null)return!0;let C=m.length;return C===1&&m==="~"||C===4&&(m==="null"||m==="Null"||m==="NULL")}i(E,"resolveYamlNull");function O(){return null}i(O,"constructYamlNull");function N(m){return m===null}return i(N,"isNull"),We=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:E,construct:O,predicate:N,represent:{canonical:i(function(){return"~"},"canonical"),lowercase:i(function(){return"null"},"lowercase"),uppercase:i(function(){return"NULL"},"uppercase"),camelcase:i(function(){return"Null"},"camelcase"),empty:i(function(){return""},"empty")},defaultStyle:"lowercase"}),We}i(Dn,"require_null");var Qe,Cn;function Hn(){if(Cn)return Qe;Cn=1;let w=H();function E(m){if(m===null)return!1;let C=m.length;return C===4&&(m==="true"||m==="True"||m==="TRUE")||C===5&&(m==="false"||m==="False"||m==="FALSE")}i(E,"resolveYamlBoolean");function O(m){return m==="true"||m==="True"||m==="TRUE"}i(O,"constructYamlBoolean");function N(m){return Object.prototype.toString.call(m)==="[object Boolean]"}return i(N,"isBoolean"),Qe=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:E,construct:O,predicate:N,represent:{lowercase:i(function(m){return m?"true":"false"},"lowercase"),uppercase:i(function(m){return m?"TRUE":"FALSE"},"uppercase"),camelcase:i(function(m){return m?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Qe}i(Hn,"requireBool");var Ve,Sn;function jn(){if(Sn)return Ve;Sn=1;let w=he(),E=H();function O(o){return o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102}i(O,"isHexCode");function N(o){return o>=48&&o<=55}i(N,"isOctCode");function m(o){return o>=48&&o<=57}i(m,"isDecCode");function C(o){if(o===null)return!1;let u=o.length,S=0,L=!1;if(!u)return!1;let v=o[S];if((v==="-"||v==="+")&&(v=o[++S]),v==="0"){if(S+1===u)return!0;if(v=o[++S],v==="b"){for(S++;S<u;S++){if(v=o[S],v!=="0"&&v!=="1")return!1;L=!0}return L&&isFinite(h(o))}if(v==="x"){for(S++;S<u;S++){if(!O(o.charCodeAt(S)))return!1;L=!0}return L&&isFinite(h(o))}if(v==="o"){for(S++;S<u;S++){if(!N(o.charCodeAt(S)))return!1;L=!0}return L&&isFinite(h(o))}}for(;S<u;S++){if(!m(o.charCodeAt(S)))return!1;L=!0}return L?isFinite(h(o)):!1}i(C,"resolveYamlInteger");function h(o){let u=o,S=1,L=u[0];if((L==="-"||L==="+")&&(L==="-"&&(S=-1),u=u.slice(1),L=u[0]),u==="0")return 0;if(L==="0"){if(u[1]==="b")return S*parseInt(u.slice(2),2);if(u[1]==="x")return S*parseInt(u.slice(2),16);if(u[1]==="o")return S*parseInt(u.slice(2),8)}return S*parseInt(u,10)}i(h,"parseYamlInteger");function a(o){return h(o)}i(a,"constructYamlInteger");function T(o){return Object.prototype.toString.call(o)==="[object Number]"&&o%1===0&&!w.isNegativeZero(o)}return i(T,"isInteger"),Ve=new E("tag:yaml.org,2002:int",{kind:"scalar",resolve:C,construct:a,predicate:T,represent:{binary:i(function(o){return o>=0?"0b"+o.toString(2):"-0b"+o.toString(2).slice(1)},"binary"),octal:i(function(o){return o>=0?"0o"+o.toString(8):"-0o"+o.toString(8).slice(1)},"octal"),decimal:i(function(o){return o.toString(10)},"decimal"),hexadecimal:i(function(o){return o>=0?"0x"+o.toString(16).toUpperCase():"-0x"+o.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ve}i(jn,"requireInt");var Xe,Tn;function Bn(){if(Tn)return Xe;Tn=1;let w=he(),E=H(),O=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),N=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function m(o){return o===null||!O.test(o)?!1:isFinite(parseFloat(o,10))?!0:N.test(o)}i(m,"resolveYamlFloat");function C(o){let u=o.toLowerCase(),S=u[0]==="-"?-1:1;return"+-".indexOf(u[0])>=0&&(u=u.slice(1)),u===".inf"?S===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:u===".nan"?NaN:S*parseFloat(u,10)}i(C,"constructYamlFloat");let h=/^[-+]?[0-9]+e/;function a(o,u){if(isNaN(o))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===o)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===o)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(w.isNegativeZero(o))return"-0.0";let S=o.toString(10);return h.test(S)?S.replace("e",".e"):S}i(a,"representYamlFloat");function T(o){return Object.prototype.toString.call(o)==="[object Number]"&&(o%1!==0||w.isNegativeZero(o))}return i(T,"isFloat"),Xe=new E("tag:yaml.org,2002:float",{kind:"scalar",resolve:m,construct:C,predicate:T,represent:a,defaultStyle:"lowercase"}),Xe}i(Bn,"requireFloat");var $e,wn;function Un(){return wn||(wn=1,$e=Pn().extend({implicit:[Dn(),Hn(),jn(),Bn()]})),$e}i(Un,"requireJson");var Je,xn;function Kn(){return xn||(xn=1,Je=Un()),Je}i(Kn,"requireCore");var Ze,bn;function Gn(){if(bn)return Ze;bn=1;let w=H(),E=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),O=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function N(h){return h===null?!1:E.exec(h)!==null||O.exec(h)!==null}i(N,"resolveYamlTimestamp");function m(h){let a=0,T=null,o=E.exec(h);if(o===null&&(o=O.exec(h)),o===null)throw new Error("Date resolve error");let u=+o[1],S=+o[2]-1,L=+o[3];if(!o[4])return new Date(Date.UTC(u,S,L));let v=+o[4],$=+o[5],F=+o[6];if(o[7]){for(a=o[7].slice(0,3);a.length<3;)a+="0";a=+a}if(o[9]){let ee=+o[10],j=+(o[11]||0);T=(ee*60+j)*6e4,o[9]==="-"&&(T=-T)}let K=new Date(Date.UTC(u,S,L,v,$,F,a));return T&&K.setTime(K.getTime()-T),K}i(m,"constructYamlTimestamp");function C(h){return h.toISOString()}return i(C,"representYamlTimestamp"),Ze=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:N,construct:m,instanceOf:Date,represent:C}),Ze}i(Gn,"requireTimestamp");var ze,_n;function Wn(){if(_n)return ze;_n=1;let w=H();function E(O){return O==="<<"||O===null}return i(E,"resolveYamlMerge"),ze=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:E}),ze}i(Wn,"requireMerge");var en,En;function Qn(){if(En)return en;En=1;let w=H(),E=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function O(h){if(h===null)return!1;let a=0,T=h.length,o=E;for(let u=0;u<T;u++){let S=o.indexOf(h.charAt(u));if(!(S>64)){if(S<0)return!1;a+=6}}return a%8===0}i(O,"resolveYamlBinary");function N(h){let a=h.replace(/[\r\n=]/g,""),T=a.length,o=E,u=0,S=[];for(let v=0;v<T;v++)v%4===0&&v&&(S.push(u>>16&255),S.push(u>>8&255),S.push(u&255)),u=u<<6|o.indexOf(a.charAt(v));let L=T%4*6;return L===0?(S.push(u>>16&255),S.push(u>>8&255),S.push(u&255)):L===18?(S.push(u>>10&255),S.push(u>>2&255)):L===12&&S.push(u>>4&255),new Uint8Array(S)}i(N,"constructYamlBinary");function m(h){let a="",T=0,o=h.length,u=E;for(let L=0;L<o;L++)L%3===0&&L&&(a+=u[T>>18&63],a+=u[T>>12&63],a+=u[T>>6&63],a+=u[T&63]),T=(T<<8)+h[L];let S=o%3;return S===0?(a+=u[T>>18&63],a+=u[T>>12&63],a+=u[T>>6&63],a+=u[T&63]):S===2?(a+=u[T>>10&63],a+=u[T>>4&63],a+=u[T<<2&63],a+=u[64]):S===1&&(a+=u[T>>2&63],a+=u[T<<4&63],a+=u[64],a+=u[64]),a}i(m,"representYamlBinary");function C(h){return Object.prototype.toString.call(h)==="[object Uint8Array]"}return i(C,"isBinary"),en=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:O,construct:N,predicate:C,represent:m}),en}i(Qn,"requireBinary");var nn,In;function Vn(){if(In)return nn;In=1;let w=H(),E=Object.prototype.hasOwnProperty,O=Object.prototype.toString;function N(C){if(C===null)return!0;let h=[],a=C;for(let T=0,o=a.length;T<o;T+=1){let u=a[T],S=!1;if(O.call(u)!=="[object Object]")return!1;let L;for(L in u)if(E.call(u,L))if(!S)S=!0;else return!1;if(!S)return!1;if(h.indexOf(L)===-1)h.push(L);else return!1}return!0}i(N,"resolveYamlOmap");function m(C){return C!==null?C:[]}return i(m,"constructYamlOmap"),nn=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:N,construct:m}),nn}i(Vn,"requireOmap");var rn,On;function Xn(){if(On)return rn;On=1;let w=H(),E=Object.prototype.toString;function O(m){if(m===null)return!0;let C=m,h=new Array(C.length);for(let a=0,T=C.length;a<T;a+=1){let o=C[a];if(E.call(o)!=="[object Object]")return!1;let u=Object.keys(o);if(u.length!==1)return!1;h[a]=[u[0],o[u[0]]]}return!0}i(O,"resolveYamlPairs");function N(m){if(m===null)return[];let C=m,h=new Array(C.length);for(let a=0,T=C.length;a<T;a+=1){let o=C[a],u=Object.keys(o);h[a]=[u[0],o[u[0]]]}return h}return i(N,"constructYamlPairs"),rn=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:O,construct:N}),rn}i(Xn,"requirePairs");var ln,kn;function $n(){if(kn)return ln;kn=1;let w=H(),E=Object.prototype.hasOwnProperty;function O(m){if(m===null)return!0;let C=m;for(let h in C)if(E.call(C,h)&&C[h]!==null)return!1;return!0}i(O,"resolveYamlSet");function N(m){return m!==null?m:{}}return i(N,"constructYamlSet"),ln=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:O,construct:N}),ln}i($n,"requireSet");var on,Ln;function cn(){return Ln||(Ln=1,on=Kn().extend({implicit:[Gn(),Wn()],explicit:[Qn(),Vn(),Xn(),$n()]})),on}i(cn,"require_default");var Nn;function zn(){if(Nn)return Oe;Nn=1;let w=he(),E=de(),O=Zn(),N=cn(),m=Object.prototype.hasOwnProperty,C=1,h=2,a=3,T=4,o=1,u=2,S=3,L=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/[\x85\u2028\u2029]/,$=/[,\[\]{}]/,F=/^(?:!|!!|![0-9A-Za-z-]+!)$/,K=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function ee(e){return Object.prototype.toString.call(e)}i(ee,"_class");function j(e){return e===10||e===13}i(j,"isEol");function B(e){return e===9||e===32}i(B,"isWhiteSpace");function P(e){return e===9||e===32||e===10||e===13}i(P,"isWsOrEol");function J(e){return e===44||e===91||e===93||e===123||e===125}i(J,"isFlowIndicator");function ke(e){if(e>=48&&e<=57)return e-48;let r=e|32;return r>=97&&r<=102?r-97+10:-1}i(ke,"fromHexCode");function Le(e){return e===120?2:e===117?4:e===85?8:0}i(Le,"escapedHexLen");function me(e){return e>=48&&e<=57?e-48:-1}i(me,"fromDecimalCode");function te(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return` `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}i(te,"simpleEscapeSequence");function Ne(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}i(Ne,"charFromCodepoint");function ce(e,r,c){r==="__proto__"?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,writable:!0,value:c}):e[r]=c}i(ce,"setProperty");let ge=new Array(256),ue=new Array(256);for(let e=0;e<256;e++)ge[e]=te(e)?1:0,ue[e]=te(e);function Y(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||N,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:100,this.maxTotalMergeKeys=typeof r.maxTotalMergeKeys=="number"?r.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}i(Y,"State");function Ae(e,r){let c={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return c.snippet=O(c),new E(r,c)}i(Ae,"generateError");function _(e,r){throw Ae(e,r)}i(_,"throwError");function ie(e,r){e.onWarning&&e.onWarning.call(null,Ae(e,r))}i(ie,"throwWarning");function G(e,r,c){let s=e.anchorMapTransactions;if(s.length!==0){let t=s[s.length-1];m.call(t,r)||(t[r]={existed:m.call(e.anchorMap,r),value:e.anchorMap[r]})}e.anchorMap[r]=c}i(G,"storeAnchor");function Re(e){e.anchorMapTransactions.push(Object.create(null))}i(Re,"beginAnchorTransaction");function ne(e){let r=e.anchorMapTransactions.pop(),c=e.anchorMapTransactions;if(c.length===0)return;let s=c[c.length-1],t=Object.keys(r);for(let y=0,n=t.length;y<n;y+=1){let l=t[y];m.call(s,l)||(s[l]=r[l])}}i(ne,"commitAnchorTransaction");function ve(e){let r=e.anchorMapTransactions.pop(),c=Object.keys(r);for(let s=c.length-1;s>=0;s-=1){let t=r[c[s]];t.existed?e.anchorMap[c[s]]=t.value:delete e.anchorMap[c[s]]}}i(ve,"rollbackAnchorTransaction");function fe(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}i(fe,"snapshotState");function re(e,r){e.position=r.position,e.line=r.line,e.lineStart=r.lineStart,e.lineIndent=r.lineIndent,e.firstTabInLine=r.firstTabInLine,e.tag=r.tag,e.anchor=r.anchor,e.kind=r.kind,e.result=r.result}i(re,"restoreState");let ye={YAML:i(function(r,c,s){r.version!==null&&_(r,"duplication of %YAML directive"),s.length!==1&&_(r,"YAML directive accepts exactly one argument");let t=/^([0-9]+)\.([0-9]+)$/.exec(s[0]);t===null&&_(r,"ill-formed argument of the YAML directive");let y=parseInt(t[1],10),n=parseInt(t[2],10);y!==1&&_(r,"unacceptable YAML version of the document"),r.version=s[0],r.checkLineBreaks=n<2,n!==1&&n!==2&&ie(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:i(function(r,c,s){let t;s.length!==2&&_(r,"TAG directive accepts exactly two arguments");let y=s[0];t=s[1],F.test(y)||_(r,"ill-formed tag handle (first argument) of the TAG directive"),m.call(r.tagMap,y)&&_(r,'there is a previously declared suffix for "'+y+'" tag handle'),K.test(t)||_(r,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{_(r,"tag prefix is malformed: "+t)}r.tagMap[y]=t},"handleTagDirective")};function U(e,r,c,s){if(r<c){let t=e.input.slice(r,c);if(s)for(let y=0,n=t.length;y<n;y+=1){let l=t.charCodeAt(y);l===9||l>=32&&l<=1114111||_(e,"expected valid JSON character")}else L.test(t)&&_(e,"the stream contains non-printable characters");e.result+=t}}i(U,"captureSegment");function Z(e,r,c,s){w.isObject(c)||_(e,"cannot merge mappings; the provided source object is unacceptable");let t=Object.keys(c);for(let y=0,n=t.length;y<n;y+=1){let l=t[y];e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&_(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),m.call(r,l)||(ce(r,l,c[l]),s[l]=!0)}}i(Z,"mergeMappings");function W(e,r,c,s,t,y,n,l,g){if(Array.isArray(t)){t=Array.prototype.slice.call(t);for(let f=0,p=t.length;f<p;f+=1)Array.isArray(t[f])&&_(e,"nested arrays are not supported inside keys"),typeof t=="object"&&ee(t[f])==="[object Object]"&&(t[f]="[object Object]")}if(typeof t=="object"&&ee(t)==="[object Object]"&&(t="[object Object]"),t=String(t),r===null&&(r={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(y))for(let f=0,p=y.length;f<p;f+=1)Z(e,r,y[f],c);else Z(e,r,y,c);else!e.json&&!m.call(c,t)&&m.call(r,t)&&(e.line=n||e.line,e.lineStart=l||e.lineStart,e.position=g||e.position,_(e,"duplicated mapping key")),ce(r,t,y),delete c[t];return r}i(W,"storeMappingPair");function le(e){let r=e.input.charCodeAt(e.position);r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):_(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}i(le,"readLineBreak");function q(e,r,c){let s=0,t=e.input.charCodeAt(e.position);for(;t!==0;){for(;B(t);)t===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),t=e.input.charCodeAt(++e.position);if(r&&t===35)do t=e.input.charCodeAt(++e.position);while(t!==10&&t!==13&&t!==0);if(j(t))for(le(e),t=e.input.charCodeAt(e.position),s++,e.lineIndent=0;t===32;)e.lineIndent++,t=e.input.charCodeAt(++e.position);else break}return c!==-1&&s!==0&&e.lineIndent<c&&ie(e,"deficient indentation"),s}i(q,"skipSeparationSpace");function oe(e){let r=e.position,c=e.input.charCodeAt(r);return!!((c===45||c===46)&&c===e.input.charCodeAt(r+1)&&c===e.input.charCodeAt(r+2)&&(r+=3,c=e.input.charCodeAt(r),c===0||P(c)))}i(oe,"testDocumentSeparator");function Q(e,r){r===1?e.result+=" ":r>1&&(e.result+=w.repeat(` `,r-1))}i(Q,"writeFoldedLines");function Ce(e,r,c){let s,t,y,n,l,g,f=e.kind,p=e.result,A=e.input.charCodeAt(e.position);if(P(A)||J(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96)return!1;if(A===63||A===45){let d=e.input.charCodeAt(e.position+1);if(P(d)||c&&J(d))return!1}for(e.kind="scalar",e.result="",s=t=e.position,y=!1;A!==0;){if(A===58){let d=e.input.charCodeAt(e.position+1);if(P(d)||c&&J(d))break}else if(A===35){let d=e.input.charCodeAt(e.position-1);if(P(d))break}else{if(e.position===e.lineStart&&oe(e)||c&&J(A))break;if(j(A))if(n=e.line,l=e.lineStart,g=e.lineIndent,q(e,!1,-1),e.lineIndent>=r){y=!0,A=e.input.charCodeAt(e.position);continue}else{e.position=t,e.line=n,e.lineStart=l,e.lineIndent=g;break}}y&&(U(e,s,t,!1),Q(e,e.line-n),s=t=e.position,y=!1),B(A)||(t=e.position+1),A=e.input.charCodeAt(++e.position)}return U(e,s,t,!1),e.result?!0:(e.kind=f,e.result=p,!1)}i(Ce,"readPlainScalar");function Se(e,r){let c,s,t=e.input.charCodeAt(e.position);if(t!==39)return!1;for(e.kind="scalar",e.result="",e.position++,c=s=e.position;(t=e.input.charCodeAt(e.position))!==0;)if(t===39)if(U(e,c,e.position,!0),t=e.input.charCodeAt(++e.position),t===39)c=e.position,e.position++,s=e.position;else return!0;else j(t)?(U(e,c,s,!0),Q(e,q(e,!1,r)),c=s=e.position):e.position===e.lineStart&&oe(e)?_(e,"unexpected end of the document within a single quoted scalar"):(e.position++,B(t)||(s=e.position));_(e,"unexpected end of the stream within a single quoted scalar")}i(Se,"readSingleQuotedScalar");function pe(e,r){let c,s,t,y=e.input.charCodeAt(e.position);if(y!==34)return!1;for(e.kind="scalar",e.result="",e.position++,c=s=e.position;(y=e.input.charCodeAt(e.position))!==0;){if(y===34)return U(e,c,e.position,!0),e.position++,!0;if(y===92){if(U(e,c,e.position,!0),y=e.input.charCodeAt(++e.position),j(y))q(e,!1,r);else if(y<256&&ge[y])e.result+=ue[y],e.position++;else if((t=Le(y))>0){let n=t,l=0;for(;n>0;n--)y=e.input.charCodeAt(++e.position),(t=ke(y))>=0?l=(l<<4)+t:_(e,"expected hexadecimal character");e.result+=Ne(l),e.position++}else _(e,"unknown escape sequence");c=s=e.position}else j(y)?(U(e,c,s,!0),Q(e,q(e,!1,r)),c=s=e.position):e.position===e.lineStart&&oe(e)?_(e,"unexpected end of the document within a double quoted scalar"):(e.position++,B(y)||(s=e.position))}_(e,"unexpected end of the stream within a double quoted scalar")}i(pe,"readDoubleQuotedScalar");function Te(e,r){let c=!0,s,t,y,n=e.tag,l,g=e.anchor,f,p,A,d,b=Object.create(null),x,I,k,R=e.input.charCodeAt(e.position);if(R===91)f=93,d=!1,l=[];else if(R===123)f=125,d=!0,l={};else return!1;for(e.anchor!==null&&G(e,e.anchor,l),R=e.input.charCodeAt(++e.position);R!==0;){if(q(e,!0,r),R=e.input.charCodeAt(e.position),R===f)return e.position++,e.tag=n,e.anchor=g,e.kind=d?"mapping":"sequence",e.result=l,!0;if(c?R===44&&_(e,"expected the node content, but found ','"):_(e,"missed comma between flow collection entries"),I=x=k=null,p=A=!1,R===63){let M=e.input.charCodeAt(e.position+1);P(M)&&(p=A=!0,e.position++,q(e,!0,r))}s=e.line,t=e.lineStart,y=e.position,X(e,r,C,!1,!0),I=e.tag,x=e.result,q(e,!0,r),R=e.input.charCodeAt(e.position),(A||e.line===s)&&R===58&&(p=!0,R=e.input.charCodeAt(++e.position),q(e,!0,r),X(e,r,C,!1,!0),k=e.result),d?W(e,l,b,I,x,k,s,t,y):p?l.push(W(e,null,b,I,x,k,s,t,y)):l.push(x),q(e,!0,r),R=e.input.charCodeAt(e.position),R===44?(c=!0,R=e.input.charCodeAt(++e.position)):c=!1}_(e,"unexpected end of the stream within a flow collection")}i(Te,"readFlowCollection");function we(e,r){let c,s=o,t=!1,y=!1,n=r,l=0,g=!1,f,p=e.input.charCodeAt(e.position);if(p===124)c=!1;else if(p===62)c=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)o===s?s=p===43?S:u:_(e,"repeat of a chomping mode identifier");else if((f=me(p))>=0)f===0?_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):y?_(e,"repeat of an indentation width identifier"):(n=r+f-1,y=!0);else break;if(B(p)){do p=e.input.charCodeAt(++e.position);while(B(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!j(p)&&p!==0)}for(;p!==0;){for(le(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!y||e.lineIndent<n)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!y&&e.lineIndent>n&&(n=e.lineIndent),j(p)){l++;continue}if(!y&&n===0&&_(e,"missing indentation for block scalar"),e.lineIndent<n){s===S?e.result+=w.repeat(` `,t?1+l:l):s===o&&t&&(e.result+=` `);break}c?B(p)?(g=!0,e.result+=w.repeat(` `,t?1+l:l)):g?(g=!1,e.result+=w.repeat(` `,l+1)):l===0?t&&(e.result+=" "):e.result+=w.repeat(` `,l):e.result+=w.repeat(` `,t?1+l:l),t=!0,y=!0,l=0;let A=e.position;for(;!j(p)&&p!==0;)p=e.input.charCodeAt(++e.position);U(e,A,e.position,!1)}return!0}i(we,"readBlockScalar");function V(e,r){let c=e.tag,s=e.anchor,t=[],y=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&G(e,e.anchor,t);let n=e.input.charCodeAt(e.position);for(;n!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,_(e,"tab characters must not be used in indentation")),n===45);){let l=e.input.charCodeAt(e.position+1);if(!P(l))break;if(y=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=r){t.push(null),n=e.input.charCodeAt(e.position);continue}let g=e.line;if(X(e,r,a,!1,!0),t.push(e.result),q(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===g||e.lineIndent>r)&&n!==0)_(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return y?(e.tag=c,e.anchor=s,e.kind="sequence",e.result=t,!0):!1}i(V,"readBlockSequence");function xe(e,r,c){let s,t,y,n,l=e.tag,g=e.anchor,f={},p=Object.create(null),A=null,d=null,b=null,x=!1,I=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&G(e,e.anchor,f);let k=e.input.charCodeAt(e.position);for(;k!==0;){!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,_(e,"tab characters must not be used in indentation"));let R=e.input.charCodeAt(e.position+1),M=e.line;if((k===63||k===58)&&P(R))k===63?(x&&(W(e,f,p,A,d,null,t,y,n),A=d=b=null),I=!0,x=!0,s=!0):x?(x=!1,s=!0):_(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=R;else{if(t=e.line,y=e.lineStart,n=e.position,!X(e,c,h,!1,!0))break;if(e.line===M){for(k=e.input.charCodeAt(e.position);B(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),P(k)||_(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(W(e,f,p,A,d,null,t,y,n),A=d=b=null),I=!0,x=!1,s=!1,A=e.tag,d=e.result;else if(I)_(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=g,!0}else if(I)_(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=g,!0}if((e.line===M||e.lineIndent>r)&&(x&&(t=e.line,y=e.lineStart,n=e.position),X(e,r,T,!0,s)&&(x?d=e.result:b=e.result),x||(W(e,f,p,A,d,b,t,y,n),A=d=b=null),q(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===M||e.lineIndent>r)&&k!==0)_(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return x&&W(e,f,p,A,d,null,t,y,n),I&&(e.tag=l,e.anchor=g,e.kind="mapping",e.result=f),I}i(xe,"readBlockMapping");function Me(e){let r=!1,c=!1,s,t,y=e.input.charCodeAt(e.position);if(y!==33)return!1;e.tag!==null&&_(e,"duplication of a tag property"),y=e.input.charCodeAt(++e.position),y===60?(r=!0,y=e.input.charCodeAt(++e.position)):y===33?(c=!0,s="!!",y=e.input.charCodeAt(++e.position)):s="!";let n=e.position;if(r){do y=e.input.charCodeAt(++e.position);while(y!==0&&y!==62);e.position<e.length?(t=e.input.slice(n,e.position),y=e.input.charCodeAt(++e.position)):_(e,"unexpected end of the stream within a verbatim tag")}else{for(;y!==0&&!P(y);)y===33&&(c?_(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(n-1,e.position+1),F.test(s)||_(e,"named tag handle cannot contain such characters"),c=!0,n=e.position+1)),y=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),$.test(t)&&_(e,"tag suffix cannot contain flow indicator characters")}t&&!K.test(t)&&_(e,"tag name cannot contain such characters: "+t);try{t=decodeURIComponent(t)}catch{_(e,"tag name is malformed: "+t)}return r?e.tag=t:m.call(e.tagMap,s)?e.tag=e.tagMap[s]+t:s==="!"?e.tag="!"+t:s==="!!"?e.tag="tag:yaml.org,2002:"+t:_(e,'undeclared tag handle "'+s+'"'),!0}i(Me,"readTagProperty");function be(e){let r=e.input.charCodeAt(e.position);if(r!==38)return!1;e.anchor!==null&&_(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position);let c=e.position;for(;r!==0&&!P(r)&&!J(r);)r=e.input.charCodeAt(++e.position);return e.position===c&&_(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(c,e.position),!0}i(be,"readAnchorProperty");function _e(e){let r=e.input.charCodeAt(e.position);if(r!==42)return!1;r=e.input.charCodeAt(++e.position);let c=e.position;for(;r!==0&&!P(r)&&!J(r);)r=e.input.charCodeAt(++e.position);e.position===c&&_(e,"name of an alias node must contain at least one character");let s=e.input.slice(c,e.position);return m.call(e.anchorMap,s)||_(e,'unidentified alias "'+s+'"'),e.result=e.anchorMap[s],q(e,!0,-1),!0}i(_e,"readAlias");function Fe(e,r,c,s){let t=fe(e);return Re(e),re(e,r),e.tag=null,e.anchor=null,e.kind=null,e.result=null,xe(e,c,s)&&e.kind==="mapping"?(ne(e),!0):(ve(e),re(e,t),!1)}i(Fe,"tryReadBlockMappingFromProperty");function X(e,r,c,s,t){let y,n,l=1,g=!1,f=!1,p=null,A,d,b;e.depth>=e.maxDepth&&_(e,"nesting exceeded maxDepth ("+e.maxDepth+")"),e.depth+=1,e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let x=y=n=T===c||a===c;if(s&&q(e,!0,-1)&&(g=!0,e.lineIndent>r?l=1:e.lineIndent===r?l=0:e.lineIndent<r&&(l=-1)),l===1)for(;;){let I=e.input.charCodeAt(e.position),k=fe(e);if(g&&(I===33&&e.tag!==null||I===38&&e.anchor!==null)||!Me(e)&&!be(e))break;p===null&&(p=k),q(e,!0,-1)?(g=!0,n=x,e.lineIndent>r?l=1:e.lineIndent===r?l=0:e.lineIndent<r&&(l=-1)):n=!1}if(n&&(n=g||t),l===1||T===c)if(C===c||h===c?d=r:d=r+1,b=e.position-e.lineStart,l===1)if(n&&(V(e,b)||xe(e,b,d))||Te(e,d))f=!0;else{let I=e.input.charCodeAt(e.position);p!==null&&x&&!n&&I!==124&&I!==62&&Fe(e,p,p.position-p.lineStart,d)||y&&we(e,d)||Se(e,d)||pe(e,d)?f=!0:_e(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&_(e,"alias node should not have any properties")):Ce(e,d,C===c)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&G(e,e.anchor,e.result)}else l===0&&(f=n&&V(e,b));if(e.tag===null)e.anchor!==null&&G(e,e.anchor,e.result);else if(e.tag==="?"){e.result!==null&&e.kind!=="scalar"&&_(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"');for(let I=0,k=e.implicitTypes.length;I<k;I+=1)if(A=e.implicitTypes[I],A.resolve(e.result)){e.result=A.construct(e.result),e.tag=A.tag,e.anchor!==null&&G(e,e.anchor,e.result);break}}else if(e.tag!=="!"){if(m.call(e.typeMap[e.kind||"fallback"],e.tag))A=e.typeMap[e.kind||"fallback"][e.tag];else{A=null;let I=e.typeMap.multi[e.kind||"fallback"];for(let k=0,R=I.length;k<R;k+=1)if(e.tag.slice(0,I[k].tag.length)===I[k].tag){A=I[k];break}}A||_(e,"unknown tag !<"+e.tag+">"),e.result!==null&&A.kind!==e.kind&&_(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+A.kind+'", not "'+e.kind+'"'),A.resolve(e.result,e.tag)?(e.result=A.construct(e.result,e.tag),e.anchor!==null&&G(e,e.anchor,e.result)):_(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.depth-=1,e.tag!==null||e.anchor!==null||f}i(X,"composeNode");function qe(e){let r=e.position,c=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(q(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){c=!0,s=e.input.charCodeAt(++e.position);let t=e.position;for(;s!==0&&!P(s);)s=e.input.charCodeAt(++e.position);let y=e.input.slice(t,e.position),n=[];for(y.length<1&&_(e,"directive name must not be less than one character in length");s!==0;){for(;B(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!j(s));break}if(j(s))break;for(t=e.position;s!==0&&!P(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}s!==0&&le(e),m.call(ye,y)?ye[y](e,y,n):ie(e,'unknown document directive "'+y+'"')}if(q(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,q(e,!0,-1)):c&&_(e,"directives end mark is expected"),X(e,e.lineIndent-1,T,!1,!0),q(e,!0,-1),e.checkLineBreaks&&v.test(e.input.slice(r,e.position))&&ie(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&oe(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,q(e,!0,-1));return}e.position<e.length-1&&_(e,"end of the stream or a document separator is expected")}i(qe,"readDocument");function Ee(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=` `),e.charCodeAt(0)===65279&&(e=e.slice(1)));let c=new Y(e,r),s=e.indexOf("\0");for(s!==-1&&(c.position=s,_(c,"null byte is not allowed in input")),c.input+="\0";c.input.charCodeAt(c.position)===32;)c.lineIndent+=1,c.position+=1;for(;c.position<c.length-1;)qe(c);return c.documents}i(Ee,"loadDocuments");function Ie(e,r,c){r!==null&&typeof r=="object"&&typeof c>"u"&&(c=r,r=null);let s=Ee(e,c);if(typeof r!="function")return s;for(let t=0,y=s.length;t<y;t+=1)r(s[t])}i(Ie,"loadAll2");function Ye(e,r){let c=Ee(e,r);if(c.length!==0){if(c.length===1)return c[0];throw new E("expected a single document in the stream, but found more")}}return i(Ye,"load2"),Oe.loadAll=Ie,Oe.load=Ye,Oe}i(zn,"requireLoader");var tn={},Rn;function ei(){if(Rn)return tn;Rn=1;let w=he(),E=de(),O=cn(),N=Object.prototype.toString,m=Object.prototype.hasOwnProperty,C=65279,h=9,a=10,T=13,o=32,u=33,S=34,L=35,v=37,$=38,F=39,K=42,ee=44,j=45,B=58,P=61,J=62,ke=63,Le=64,me=91,te=93,Ne=96,ce=123,ge=124,ue=125,Y={};Y[0]="\\0",Y[7]="\\a",Y[8]="\\b",Y[9]="\\t",Y[10]="\\n",Y[11]="\\v",Y[12]="\\f",Y[13]="\\r",Y[27]="\\e",Y[34]='\\"',Y[92]="\\\\",Y[133]="\\N",Y[160]="\\_",Y[8232]="\\L",Y[8233]="\\P";let Ae=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ie(n,l){if(l===null)return{};let g={},f=Object.keys(l);for(let p=0,A=f.length;p<A;p+=1){let d=f[p],b=String(l[d]);d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2));let x=n.compiledTypeMap.fallback[d];x&&m.call(x.styleAliases,b)&&(b=x.styleAliases[b]),g[d]=b}return g}i(ie,"compileStyleMap");function G(n){let l,g,f=n.toString(16).toUpperCase();if(n<=255)l="x",g=2;else if(n<=65535)l="u",g=4;else if(n<=4294967295)l="U",g=8;else throw new E("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+l+w.repeat("0",g-f.length)+f}i(G,"encodeHex");let Re=1,ne=2;function ve(n){this.schema=n.schema||O,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=w.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=ie(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?ne:Re,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}i(ve,"State");function fe(n,l){let g=w.repeat(" ",l),f=0,p="",A=n.length;for(;f<A;){let d,b=n.indexOf(` `,f);b===-1?(d=n.slice(f),f=A):(d=n.slice(f,b+1),f=b+1),d.length&&d!==` `&&(p+=g),p+=d}return p}i(fe,"indentString");function re(n,l){return` `+w.repeat(" ",n.indent*l)}i(re,"generateNextLine");function ye(n,l){for(let g=0,f=n.implicitTypes.length;g<f;g+=1)if(n.implicitTypes[g].resolve(l))return!0;return!1}i(ye,"testImplicitResolving");function U(n){return n===o||n===h}i(U,"isWhitespace");function Z(n){return n>=32&&n<=126||n>=161&&n<=55295&&n!==8232&&n!==8233||n>=57344&&n<=65533&&n!==C||n>=65536&&n<=1114111}i(Z,"isPrintable");function W(n){return Z(n)&&n!==C&&n!==T&&n!==a}i(W,"isNsCharOrWhitespace");function le(n,l,g){let f=W(n),p=f&&!U(n);return(g?f:f&&n!==ee&&n!==me&&n!==te&&n!==ce&&n!==ue)&&n!==L&&!(l===B&&!p)||W(l)&&!U(l)&&n===L||l===B&&p}i(le,"isPlainSafe");function q(n){return Z(n)&&n!==C&&!U(n)&&n!==j&&n!==ke&&n!==B&&n!==ee&&n!==me&&n!==te&&n!==ce&&n!==ue&&n!==L&&n!==$&&n!==K&&n!==u&&n!==ge&&n!==P&&n!==J&&n!==F&&n!==S&&n!==v&&n!==Le&&n!==Ne}i(q,"isPlainSafeFirst");function oe(n){return!U(n)&&n!==B}i(oe,"isPlainSafeLast");function Q(n,l){let g=n.charCodeAt(l),f;return g>=55296&&g<=56319&&l+1<n.length&&(f=n.charCodeAt(l+1),f>=56320&&f<=57343)?(g-55296)*1024+f-56320+65536:g}i(Q,"codePointAt");function Ce(n){return/^\n* /.test(n)}i(Ce,"needIndentIndicator");let Se=1,pe=2,Te=3,we=4,V=5;function xe(n,l,g,f,p,A,d,b){let x,I=0,k=null,R=!1,M=!1,un=f!==-1,se=-1,ae=q(Q(n,0))&&oe(Q(n,n.length-1));if(l||d)for(x=0;x<n.length;I>=65536?x+=2:x++){if(I=Q(n,x),!Z(I))return V;ae=ae&&le(I,k,b),k=I}else{for(x=0;x<n.length;I>=65536?x+=2:x++){if(I=Q(n,x),I===a)R=!0,un&&(M=M||x-se-1>f&&n[se+1]!==" ",se=x);else if(!Z(I))return V;ae=ae&&le(I,k,b),k=I}M=M||un&&x-se-1>f&&n[se+1]!==" "}return!R&&!M?ae&&!d&&!p(n)?Se:A===ne?V:pe:g>9&&Ce(n)?V:d?A===ne?V:pe:M?we:Te}i(xe,"chooseScalarStyle");function Me(n,l,g,f,p){n.dump=(function(){if(l.length===0)return n.quotingType===ne?'""':"''";if(!n.noCompatMode&&(Ae.indexOf(l)!==-1||_.test(l)))return n.quotingType===ne?'"'+l+'"':"'"+l+"'";let A=n.indent*Math.max(1,g),d=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-A),b=f||n.flowLevel>-1&&g>=n.flowLevel;function x(I){return ye(n,I)}switch(i(x,"testAmbiguity"),xe(l,b,n.indent,d,x,n.quotingType,n.forceQuotes&&!f,p)){case Se:return l;case pe:return"'"+l.replace(/'/g,"''")+"'";case Te:return"|"+be(l,n.indent)+_e(fe(l,A));case we:return">"+be(l,n.indent)+_e(fe(Fe(l,d),A));case V:return'"'+qe(l)+'"';default:throw new E("impossible error: invalid scalar style")}})()}i(Me,"writeScalar");function be(n,l){let g=Ce(n)?String(l):"",f=n[n.length-1]===` `,A=f&&(n[n.length-2]===` `||n===` `)?"+":f?"":"-";return g+A+` `}i(be,"blockHeader");function _e(n){return n[n.length-1]===` `?n.slice(0,-1):n}i(_e,"dropEndingNewline");function Fe(n,l){let g=/(\n+)([^\n]*)/g,f=(function(){let b=n.indexOf(` `);return b=b!==-1?b:n.length,g.lastIndex=b,X(n.slice(0,b),l)})(),p=n[0]===` `||n[0]===" ",A,d;for(;d=g.exec(n);){let b=d[1],x=d[2];A=x[0]===" ",f+=b+(!p&&!A&&x!==""?` `:"")+X(x,l),p=A}return f}i(Fe,"foldString");function X(n,l){if(n===""||n[0]===" ")return n;let g=/ [^ ]/g,f,p=0,A,d=0,b=0,x="";for(;f=g.exec(n);)b=f.index,b-p>l&&(A=d>p?d:b,x+=` `+n.slice(p,A),p=A+1),d=b;return x+=` `,n.length-p>l&&d>p?x+=n.slice(p,d)+` `+n.slice(d+1):x+=n.slice(p),x.slice(1)}i(X,"foldLine");function qe(n){let l="",g=0;for(let f=0;f<n.length;g>=65536?f+=2:f++){g=Q(n,f);let p=Y[g];!p&&Z(g)?(l+=n[f],g>=65536&&(l+=n[f+1])):l+=p||G(g)}return l}i(qe,"escapeString");function Ee(n,l,g){let f="",p=n.tag;for(let A=0,d=g.length;A<d;A+=1){let b=g[A];n.replacer&&(b=n.replacer.call(g,String(A),b)),(c(n,l,b,!1,!1)||typeof b>"u"&&c(n,l,null,!1,!1))&&(f!==""&&(f+=","+(n.condenseFlow?"":" ")),f+=n.dump)}n.tag=p,n.dump="["+f+"]"}i(Ee,"writeFlowSequence");function Ie(n,l,g,f){let p="",A=n.tag;for(let d=0,b=g.length;d<b;d+=1){let x=g[d];n.replacer&&(x=n.replacer.call(g,String(d),x)),(c(n,l+1,x,!0,!0,!1,!0)||typeof x>"u"&&c(n,l+1,null,!0,!0,!1,!0))&&((!f||p!=="")&&(p+=re(n,l)),n.dump&&a===n.dump.charCodeAt(0)?p+="-":p+="- ",p+=n.dump)}n.tag=A,n.dump=p||"[]"}i(Ie,"writeBlockSequence");function Ye(n,l,g){let f="",p=n.tag,A=Object.keys(g);for(let d=0,b=A.length;d<b;d+=1){let x="";f!==""&&(x+=", "),n.condenseFlow&&(x+='"');let I=A[d],k=g[I];n.replacer&&(k=n.replacer.call(g,I,k)),c(n,l,I,!1,!1)&&(n.dump.length>1024&&(x+="? "),x+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),c(n,l,k,!1,!1)&&(x+=n.dump,f+=x))}n.tag=p,n.dump="{"+f+"}"}i(Ye,"writeFlowMapping");function e(n,l,g,f){let p="",A=n.tag,d=Object.keys(g);if(n.sortKeys===!0)d.sort();else if(typeof n.sortKeys=="function")d.sort(n.sortKeys);else if(n.sortKeys)throw new E("sortKeys must be a boolean or a function");for(let b=0,x=d.length;b<x;b+=1){let I="";(!f||p!=="")&&(I+=re(n,l));let k=d[b],R=g[k];if(n.replacer&&(R=n.replacer.call(g,k,R)),!c(n,l+1,k,!0,!0,!0))continue;let M=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024;M&&(n.dump&&a===n.dump.charCodeAt(0)?I+="?":I+="? "),I+=n.dump,M&&(I+=re(n,l)),c(n,l+1,R,!0,M)&&(n.dump&&a===n.dump.charCodeAt(0)?I+=":":I+=": ",I+=n.dump,p+=I)}n.tag=A,n.dump=p||"{}"}i(e,"writeBlockMapping");function r(n,l,g){let f=g?n.explicitTypes:n.implicitTypes;for(let p=0,A=f.length;p<A;p+=1){let d=f[p];if((d.instanceOf||d.predicate)&&(!d.instanceOf||typeof l=="object"&&l instanceof d.instanceOf)&&(!d.predicate||d.predicate(l))){if(g?d.multi&&d.representName?n.tag=d.representName(l):n.tag=d.tag:n.tag="?",d.represent){let b=n.styleMap[d.tag]||d.defaultStyle,x;if(N.call(d.represent)==="[object Function]")x=d.represent(l,b);else if(m.call(d.represent,b))x=d.represent[b](l,b);else throw new E("!<"+d.tag+'> tag resolver accepts not "'+b+'" style');n.dump=x}return!0}}return!1}i(r,"detectType");function c(n,l,g,f,p,A,d){n.tag=null,n.dump=g,r(n,g,!1)||r(n,g,!0);let b=N.call(n.dump),x=f;f&&(f=n.flowLevel<0||n.flowLevel>l);let I=b==="[object Object]"||b==="[object Array]",k,R;if(I&&(k=n.duplicates.indexOf(g),R=k!==-1),(n.tag!==null&&n.tag!=="?"||R||n.indent!==2&&l>0)&&(p=!1),R&&n.usedDuplicates[k])n.dump="*ref_"+k;else{if(I&&R&&!n.usedDuplicates[k]&&(n.usedDuplicates[k]=!0),b==="[object Object]")f&&Object.keys(n.dump).length!==0?(e(n,l,n.dump,p),R&&(n.dump="&ref_"+k+n.dump)):(Ye(n,l,n.dump),R&&(n.dump="&ref_"+k+" "+n.dump));else if(b==="[object Array]")f&&n.dump.length!==0?(n.noArrayIndent&&!d&&l>0?Ie(n,l-1,n.dump,p):Ie(n,l,n.dump,p),R&&(n.dump="&ref_"+k+n.dump)):(Ee(n,l,n.dump),R&&(n.dump="&ref_"+k+" "+n.dump));else if(b==="[object String]")n.tag!=="?"&&Me(n,n.dump,l,A,x);else{if(b==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new E("unacceptable kind of an object to dump "+b)}if(n.tag!==null&&n.tag!=="?"){let M=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21");n.tag[0]==="!"?M="!"+M:M.slice(0,18)==="tag:yaml.org,2002:"?M="!!"+M.slice(18):M="!<"+M+">",n.dump=M+" "+n.dump}}return!0}i(c,"writeNode");function s(n,l){let g=[],f=[];t(n,g,f);let p=f.length;for(let A=0;A<p;A+=1)l.duplicates.push(g[f[A]]);l.usedDuplicates=new Array(p)}i(s,"getDuplicateReferences");function t(n,l,g){if(n!==null&&typeof n=="object"){let f=l.indexOf(n);if(f!==-1)g.indexOf(f)===-1&&g.push(f);else if(l.push(n),Array.isArray(n))for(let p=0,A=n.length;p<A;p+=1)t(n[p],l,g);else{let p=Object.keys(n);for(let A=0,d=p.length;A<d;A+=1)t(n[p[A]],l,g)}}}i(t,"inspectNode");function y(n,l){l=l||{};let g=new ve(l);g.noRefs||s(n,g);let f=n;return g.replacer&&(f=g.replacer.call({"":f},"",f)),c(g,0,f,!0,!0)?g.dump+` `:""}return i(y,"dump2"),tn.dump=y,tn}i(ei,"requireDumper");var vn;function ni(){if(vn)return D;vn=1;let w=zn(),E=ei();function O(N,m){return function(){throw new Error("Function yaml."+N+" is removed in js-yaml 4. Use yaml."+m+" instead, which is now safe by default.")}}return i(O,"renamed"),D.Type=H(),D.Schema=Mn(),D.FAILSAFE_SCHEMA=Pn(),D.JSON_SCHEMA=Un(),D.CORE_SCHEMA=Kn(),D.DEFAULT_SCHEMA=cn(),D.load=w.load,D.loadAll=w.loadAll,D.dump=E.dump,D.YAMLException=de(),D.types={binary:Qn(),float:Bn(),map:Yn(),null:Dn(),pairs:Xn(),set:$n(),timestamp:Gn(),bool:Hn(),int:jn(),merge:Wn(),omap:Vn(),seq:qn(),str:Fn()},D.safeLoad=O("safeLoad","load"),D.safeLoadAll=O("safeLoadAll","loadAll"),D.safeDump=O("safeDump","dump"),D}i(ni,"requireJsYaml");var ii=ni(),ri=Jn(ii),{Type:li,Schema:oi,FAILSAFE_SCHEMA:ti,JSON_SCHEMA:ci,CORE_SCHEMA:ui,DEFAULT_SCHEMA:fi,load:pi,loadAll:si,dump:ai,YAMLException:hi,types:di,safeLoad:mi,safeLoadAll:gi,safeDump:Ai}=ri;export{ci as a,pi as b};