You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
152 KiB
1 lines
152 KiB
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t=function(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n};var n={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".concat(e)}};var r={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}},o={},i=function(e,t){return i=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])},i(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},s.apply(this,arguments)};function a(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 c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function u(e){return this instanceof u?(this.v=e,this):new u(e)}var l,f,h,p=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}i(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,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},__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,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(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(s,a)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,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:a,__read:c,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(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 i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},__await:u,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof u?Promise.resolve(n.value.v).then(c,l):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[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:u(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=a(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}}),d={},g={};l=g,f="\n",h=function(){function e(e){this.string=e;for(var t=[0],n=0;n<e.length;)switch(e[n]){case f:n+=f.length,t.push(n);break;case"\r":e[n+="\r".length]===f&&(n+=f.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}(),l.__esModule=!0,l.default=h;var m=function(e){return e&&e.Math==Math&&e},y=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof e&&e)||function(){return this}()||Function("return this")(),v={},w=function(e){try{return!!e()}catch(e){return!0}},_=!w((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),E=Function.prototype.call,b=E.bind?E.bind(E):function(){return E.apply(E,arguments)},S={},A={}.propertyIsEnumerable,M=Object.getOwnPropertyDescriptor,O=M&&!A.call({1:2},1);S.f=O?function(e){var t=M(this,e);return!!t&&t.enumerable}:A;var L,N,T=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},C=Function.prototype,P=C.bind,x=C.call,R=P&&P.bind(x),I=P?function(e){return e&&R(x,e)}:function(e){return e&&function(){return x.apply(e,arguments)}},k=I,B=k({}.toString),Y=k("".slice),D=function(e){return Y(B(e),8,-1)},F=I,U=w,j=D,W=y.Object,K=F("".split),V=U((function(){return!W("z").propertyIsEnumerable(0)}))?function(e){return"String"==j(e)?K(e,""):W(e)}:W,Q=y.TypeError,q=function(e){if(null==e)throw Q("Can't call method on "+e);return e},J=V,$=q,G=function(e){return J($(e))},H=function(e){return"function"==typeof e},z=H,Z=function(e){return"object"==typeof e?null!==e:z(e)},X=y,ee=H,te=function(e){return ee(e)?e:void 0},ne=function(e,t){return arguments.length<2?te(X[e]):X[e]&&X[e][t]},re=I({}.isPrototypeOf),oe=ne("navigator","userAgent")||"",ie=y,se=oe,ae=ie.process,ce=ie.Deno,ue=ae&&ae.versions||ce&&ce.version,le=ue&&ue.v8;le&&(N=(L=le.split("."))[0]>0&&L[0]<4?1:+(L[0]+L[1])),!N&&se&&(!(L=se.match(/Edge\/(\d+)/))||L[1]>=74)&&(L=se.match(/Chrome\/(\d+)/))&&(N=+L[1]);var fe=N,he=fe,pe=w,de=!!Object.getOwnPropertySymbols&&!pe((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&he&&he<41})),ge=de&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,me=ne,ye=H,ve=re,we=ge,_e=y.Object,Ee=we?function(e){return"symbol"==typeof e}:function(e){var t=me("Symbol");return ye(t)&&ve(t.prototype,_e(e))},be=y.String,Se=H,Ae=function(e){try{return be(e)}catch(e){return"Object"}},Me=y.TypeError,Oe=function(e){if(Se(e))return e;throw Me(Ae(e)+" is not a function")},Le=Oe,Ne=b,Te=H,Ce=Z,Pe=y.TypeError,xe={exports:{}},Re=y,Ie=Object.defineProperty,ke=function(e,t){try{Ie(Re,e,{value:t,configurable:!0,writable:!0})}catch(n){Re[e]=t}return t},Be=ke,Ye=y["__core-js_shared__"]||Be("__core-js_shared__",{}),De=Ye;(xe.exports=function(e,t){return De[e]||(De[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"});var Fe=q,Ue=y.Object,je=function(e){return Ue(Fe(e))},We=je,Ke=I({}.hasOwnProperty),Ve=Object.hasOwn||function(e,t){return Ke(We(e),t)},Qe=I,qe=0,Je=Math.random(),$e=Qe(1..toString),Ge=function(e){return"Symbol("+(void 0===e?"":e)+")_"+$e(++qe+Je,36)},He=y,ze=xe.exports,Ze=Ve,Xe=Ge,et=de,tt=ge,nt=ze("wks"),rt=He.Symbol,ot=rt&&rt.for,it=tt?rt:rt&&rt.withoutSetter||Xe,st=function(e){if(!Ze(nt,e)||!et&&"string"!=typeof nt[e]){var t="Symbol."+e;et&&Ze(rt,e)?nt[e]=rt[e]:nt[e]=tt&&ot?ot(t):it(t)}return nt[e]},at=b,ct=Z,ut=Ee,lt=function(e,t){var n=e[t];return null==n?void 0:Le(n)},ft=function(e,t){var n,r;if("string"===t&&Te(n=e.toString)&&!Ce(r=Ne(n,e)))return r;if(Te(n=e.valueOf)&&!Ce(r=Ne(n,e)))return r;if("string"!==t&&Te(n=e.toString)&&!Ce(r=Ne(n,e)))return r;throw Pe("Can't convert object to primitive value")},ht=st,pt=y.TypeError,dt=ht("toPrimitive"),gt=function(e,t){if(!ct(e)||ut(e))return e;var n,r=lt(e,dt);if(r){if(void 0===t&&(t="default"),n=at(r,e,t),!ct(n)||ut(n))return n;throw pt("Can't convert object to primitive value")}return void 0===t&&(t="number"),ft(e,t)},mt=Ee,yt=function(e){var t=gt(e,"string");return mt(t)?t:t+""},vt=Z,wt=y.document,_t=vt(wt)&&vt(wt.createElement),Et=function(e){return _t?wt.createElement(e):{}},bt=!_&&!w((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),St=_,At=b,Mt=S,Ot=T,Lt=G,Nt=yt,Tt=Ve,Ct=bt,Pt=Object.getOwnPropertyDescriptor;v.f=St?Pt:function(e,t){if(e=Lt(e),t=Nt(t),Ct)try{return Pt(e,t)}catch(e){}if(Tt(e,t))return Ot(!At(Mt.f,e,t),e[t])};var xt={},Rt=y,It=Z,kt=Rt.String,Bt=Rt.TypeError,Yt=function(e){if(It(e))return e;throw Bt(kt(e)+" is not an object")},Dt=_,Ft=bt,Ut=Yt,jt=yt,Wt=y.TypeError,Kt=Object.defineProperty;xt.f=Dt?Kt:function(e,t,n){if(Ut(e),t=jt(t),Ut(n),Ft)try{return Kt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Wt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Vt=xt,Qt=T,qt=_?function(e,t,n){return Vt.f(e,t,Qt(1,n))}:function(e,t,n){return e[t]=n,e},Jt={exports:{}},$t=H,Gt=Ye,Ht=I(Function.toString);$t(Gt.inspectSource)||(Gt.inspectSource=function(e){return Ht(e)});var zt,Zt,Xt,en=Gt.inspectSource,tn=H,nn=en,rn=y.WeakMap,on=tn(rn)&&/native code/.test(nn(rn)),sn=xe.exports,an=Ge,cn=sn("keys"),un={},ln=on,fn=y,hn=I,pn=Z,dn=qt,gn=Ve,mn=Ye,yn=function(e){return cn[e]||(cn[e]=an(e))},vn=un,wn=fn.TypeError,_n=fn.WeakMap;if(ln||mn.state){var En=mn.state||(mn.state=new _n),bn=hn(En.get),Sn=hn(En.has),An=hn(En.set);zt=function(e,t){if(Sn(En,e))throw new wn("Object already initialized");return t.facade=e,An(En,e,t),t},Zt=function(e){return bn(En,e)||{}},Xt=function(e){return Sn(En,e)}}else{var Mn=yn("state");vn[Mn]=!0,zt=function(e,t){if(gn(e,Mn))throw new wn("Object already initialized");return t.facade=e,dn(e,Mn,t),t},Zt=function(e){return gn(e,Mn)?e[Mn]:{}},Xt=function(e){return gn(e,Mn)}}var On={set:zt,get:Zt,has:Xt,enforce:function(e){return Xt(e)?Zt(e):zt(e,{})},getterFor:function(e){return function(t){var n;if(!pn(t)||(n=Zt(t)).type!==e)throw wn("Incompatible receiver, "+e+" required");return n}}},Ln=_,Nn=Ve,Tn=Function.prototype,Cn=Ln&&Object.getOwnPropertyDescriptor,Pn=Nn(Tn,"name"),xn=Pn&&"something"===function(){}.name,Rn=Pn&&(!Ln||Ln&&Cn(Tn,"name").configurable),In=y,kn=H,Bn=Ve,Yn=qt,Dn=ke,Fn=en,Un={EXISTS:Pn,PROPER:xn,CONFIGURABLE:Rn}.CONFIGURABLE,jn=On.get,Wn=On.enforce,Kn=String(String).split("String");(Jt.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet,c=r&&void 0!==r.name?r.name:t;kn(n)&&("Symbol("===String(c).slice(0,7)&&(c="["+String(c).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Bn(n,"name")||Un&&n.name!==c)&&Yn(n,"name",c),(o=Wn(n)).source||(o.source=Kn.join("string"==typeof c?c:""))),e!==In?(i?!a&&e[t]&&(s=!0):delete e[t],s?e[t]=n:Yn(e,t,n)):s?e[t]=n:Dn(t,n)})(Function.prototype,"toString",(function(){return kn(this)&&jn(this).source||Fn(this)}));var Vn={},Qn=Math.ceil,qn=Math.floor,Jn=function(e){var t=+e;return t!=t||0===t?0:(t>0?qn:Qn)(t)},$n=Jn,Gn=Math.max,Hn=Math.min,zn=Jn,Zn=Math.min,Xn=function(e){return e>0?Zn(zn(e),9007199254740991):0},er=function(e){return Xn(e.length)},tr=G,nr=function(e,t){var n=$n(e);return n<0?Gn(n+t,0):Hn(n,t)},rr=er,or=function(e){return function(t,n,r){var o,i=tr(t),s=rr(i),a=nr(r,s);if(e&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ir={includes:or(!0),indexOf:or(!1)},sr=Ve,ar=G,cr=ir.indexOf,ur=un,lr=I([].push),fr=function(e,t){var n,r=ar(e),o=0,i=[];for(n in r)!sr(ur,n)&&sr(r,n)&&lr(i,n);for(;t.length>o;)sr(r,n=t[o++])&&(~cr(i,n)||lr(i,n));return i},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Vn.f=Object.getOwnPropertyNames||function(e){return fr(e,hr)};var pr={};pr.f=Object.getOwnPropertySymbols;var dr=ne,gr=Vn,mr=pr,yr=Yt,vr=I([].concat),wr=dr("Reflect","ownKeys")||function(e){var t=gr.f(yr(e)),n=mr.f;return n?vr(t,n(e)):t},_r=Ve,Er=wr,br=v,Sr=xt,Ar=w,Mr=H,Or=/#|\.prototype\./,Lr=function(e,t){var n=Tr[Nr(e)];return n==Pr||n!=Cr&&(Mr(t)?Ar(t):!!t)},Nr=Lr.normalize=function(e){return String(e).replace(Or,".").toLowerCase()},Tr=Lr.data={},Cr=Lr.NATIVE="N",Pr=Lr.POLYFILL="P",xr=Lr,Rr=y,Ir=v.f,kr=qt,Br=Jt.exports,Yr=ke,Dr=function(e,t){for(var n=Er(t),r=Sr.f,o=br.f,i=0;i<n.length;i++){var s=n[i];_r(e,s)||r(e,s,o(t,s))}},Fr=xr,Ur={};Ur[st("toStringTag")]="z";var jr=y,Wr="[object z]"===String(Ur),Kr=H,Vr=D,Qr=st("toStringTag"),qr=jr.Object,Jr="Arguments"==Vr(function(){return arguments}()),$r=Wr?Vr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=qr(e),Qr))?n:Jr?Vr(t):"Object"==(r=Vr(t))&&Kr(t.callee)?"Arguments":r},Gr=$r,Hr=y.String,zr=I([].slice),Zr=Math.floor,Xr=function(e,t){var n=e.length,r=Zr(n/2);return n<8?eo(e,t):to(e,Xr(zr(e,0,r),t),Xr(zr(e,r),t),t)},eo=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},to=function(e,t,n,r){for(var o=t.length,i=n.length,s=0,a=0;s<o||a<i;)e[s+a]=s<o&&a<i?r(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e},no=Xr,ro=w,oo=oe.match(/firefox\/(\d+)/i),io=!!oo&&+oo[1],so=/MSIE|Trident/.test(oe),ao=oe.match(/AppleWebKit\/(\d+)\./),co=!!ao&&+ao[1],uo=function(e,t){var n,r,o,i,s,a=e.target,c=e.global,u=e.stat;if(n=c?Rr:u?Rr[a]||Yr(a,{}):(Rr[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(s=Ir(n,r))&&s.value:n[r],!Fr(c?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Dr(i,o)}(e.sham||o&&o.sham)&&kr(i,"sham",!0),Br(n,r,i,e)}},lo=I,fo=Oe,ho=je,po=er,go=function(e){if("Symbol"===Gr(e))throw TypeError("Cannot convert a Symbol value to a string");return Hr(e)},mo=w,yo=no,vo=function(e,t){var n=[][e];return!!n&&ro((function(){n.call(null,t||function(){throw 1},1)}))},wo=io,_o=so,Eo=fe,bo=co,So=[],Ao=lo(So.sort),Mo=lo(So.push),Oo=mo((function(){So.sort(void 0)})),Lo=mo((function(){So.sort(null)})),No=vo("sort"),To=!mo((function(){if(Eo)return Eo<70;if(!(wo&&wo>3)){if(_o)return!0;if(bo)return bo<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)So.push({k:t+r,v:n})}for(So.sort((function(e,t){return t.v-e.v})),r=0;r<So.length;r++)t=So[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));uo({target:"Array",proto:!0,forced:Oo||!Lo||!No||!To},{sort:function(e){void 0!==e&&fo(e);var t=ho(this);if(To)return void 0===e?Ao(t):Ao(t,e);var n,r,o=[],i=po(t);for(r=0;r<i;r++)r in t&&Mo(o,t[r]);for(yo(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:go(t)>go(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<i;)delete t[r++];return t}});var Co={},Po={};Po.__esModule=!0,Po.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})};var xo={};xo.__esModule=!0,xo.getPointText=function(e){return e.line+":"+e.column},Co.__esModule=!0;var Ro=Po,Io=xo;function ko(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,i=e[o.line-1].trailingAttachableNode;(!i||o.column>=i.position.end.column)&&(e[o.line-1].trailingAttachableNode=t)}if("root"!==t.type&&"document"!==t.type&&"documentHead"!==t.type&&"documentBody"!==t.type)for(var s=t.position,a=(n=s.start,0),c=[(o=s.end).line].concat(n.line===o.line?[]:n.line);a<c.length;a++){var u=c[a],l=e[u-1].trailingNode;(!l||o.column>=l.position.end.column)&&(e[u-1].trailingNode=t)}"children"in t&&t.children.forEach((function(t){ko(e,t)}))}}function Bo(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||Yo(e));default:return!1}}function Yo(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}Co.attachComments=function(e){Ro.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 ko(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 "+Io.getPointText(e.position.start));return Ro.defineParents(e,o),void(o.trailingComment=e)}for(var i=r;i>=n.position.start.line;i--){var s=t[i-1].trailingNode,a=void 0;if(s)a=s;else{if(i===r||!t[i-1].comment)continue;a=t[i-1].comment._parent}if("sequence"!==a.type&&"mapping"!==a.type||(a=a.children[0]),"mappingItem"===a.type){var c=a.children,u=c[0],l=c[1];a=Yo(u)?u:l}for(;;){if(Bo(a,e))return Ro.defineParents(e,a),void a.endComments.push(e);if(!a._parent)break;a=a._parent}break}for(i=r+1;i<=n.position.end.line;i++){var f=t[i-1].leadingAttachableNode;if(f)return Ro.defineParents(e,f),void f.leadingComments.push(e)}var h=n.children[1];Ro.defineParents(e,h),h.endComments.push(e)}(e,t,n[0])}))};var Do={},Fo={};Fo.__esModule=!0,Fo.createNode=function(e,t){return{type:e,position:t}},Do.__esModule=!0;var Uo=p,jo=Fo;Do.createRoot=function(e,t,n){return Uo.__assign(Uo.__assign({},jo.createNode("root",e)),{children:t,comments:n})};var Wo={};Wo.__esModule=!0,Wo.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))}};var Ko={},Vo={},Qo={},qo={},Jo={};Jo.__esModule=!0,Jo.createLeadingCommentAttachable=function(){return{leadingComments:[]}};var $o={};$o.__esModule=!0,$o.createTrailingCommentAttachable=function(e){return void 0===e&&(e=null),{trailingComment:e}},qo.__esModule=!0;var Go=p,Ho=Jo,zo=$o;qo.createCommentAttachable=function(){return Go.__assign(Go.__assign({},Ho.createLeadingCommentAttachable()),zo.createTrailingCommentAttachable())},Qo.__esModule=!0;var Zo=p,Xo=qo,ei=Fo;Qo.createAlias=function(e,t,n){return Zo.__assign(Zo.__assign(Zo.__assign(Zo.__assign({},ei.createNode("alias",e)),Xo.createCommentAttachable()),t),{value:n})},Vo.__esModule=!0;var ti=Qo;Vo.transformAlias=function(e,t){var n=e.cstNode;return ti.createAlias(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)};var ni={},ri={__esModule:!0},oi=p;ri.createBlockFolded=function(e){return oi.__assign(oi.__assign({},e),{type:"blockFolded"})};var ii={},si={__esModule:!0},ai=p,ci=Jo,ui=Fo;si.createBlockValue=function(e,t,n,r,o,i){return ai.__assign(ai.__assign(ai.__assign(ai.__assign({},ui.createNode("blockValue",e)),ci.createLeadingCommentAttachable()),t),{chomping:n,indent:r,value:o,indicatorComment:i})};var li={},fi={};!function(e){var t;e.__esModule=!0,(t=e.PropLeadingCharacter||(e.PropLeadingCharacter={})).Tag="!",t.Anchor="&",t.Comment="#"}(fi);var hi={__esModule:!0},pi=p,di=Fo;hi.createAnchor=function(e,t){return pi.__assign(pi.__assign({},di.createNode("anchor",e)),{value:t})};var gi={__esModule:!0},mi=p,yi=Fo;gi.createComment=function(e,t){return mi.__assign(mi.__assign({},yi.createNode("comment",e)),{value:t})};var vi={};vi.__esModule=!0,vi.createContent=function(e,t,n){return{anchor:t,tag:e,middleComments:n}};var wi={__esModule:!0},_i=p,Ei=Fo;wi.createTag=function(e,t){return _i.__assign(_i.__assign({},Ei.createNode("tag",e)),{value:t})},li.__esModule=!0;var bi=fi,Si=hi,Ai=gi,Mi=vi,Oi=wi;li.transformContent=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,o=[],i=null,s=null,a=null,c=0,u=r.props;c<u.length;c++){var l=u[c],f=t.text[l.origStart];switch(f){case bi.PropLeadingCharacter.Tag:i=i||l,s=Oi.createTag(t.transformRange(l),e.tag);break;case bi.PropLeadingCharacter.Anchor:i=i||l,a=Si.createAnchor(t.transformRange(l),r.anchor);break;case bi.PropLeadingCharacter.Comment:var h=Ai.createComment(t.transformRange(l),t.text.slice(l.origStart+1,l.origEnd));t.comments.push(h),!n(h)&&i&&i.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&o.push(h);break;default:throw new Error("Unexpected leading character "+JSON.stringify(f))}}return Mi.createContent(s,a,o)},ii.__esModule=!0;var Li,Ni=si,Ti=xo,Ci=li;!function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"}(Li||(Li={})),ii.transformAstBlockValue=function(e,t){var n=e.cstNode,r="CLIP"===n.chomping?0:1,o=n.header.origEnd-n.header.origStart-1-r!=0,i=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),s=null,a=Ci.transformContent(e,t,(function(e){if(!(i.start.offset<e.position.start.offset&&e.position.end.offset<i.end.offset))return!1;if(s)throw new Error("Unexpected multiple indicator comments at "+Ti.getPointText(e.position.start));return s=e,!0}));return Ni.createBlockValue(i,a,Li[n.chomping],o?n.blockIndent:null,n.strValue,s)},ni.__esModule=!0;var Pi=ri,xi=ii;ni.transformBlockFolded=function(e,t){return Pi.createBlockFolded(xi.transformAstBlockValue(e,t))};var Ri={},Ii={__esModule:!0},ki=p;Ii.createBlockLiteral=function(e){return ki.__assign(ki.__assign({},e),{type:"blockLiteral"})},Ri.__esModule=!0;var Bi=Ii,Yi=ii;Ri.transformBlockLiteral=function(e,t){return Bi.createBlockLiteral(Yi.transformAstBlockValue(e,t))};var Di={__esModule:!0},Fi=gi;Di.transformComment=function(e,t){return Fi.createComment(t.transformRange(e.range),e.comment)};var Ui={},ji={__esModule:!0},Wi=p,Ki=qo,Vi=Fo;ji.createDirective=function(e,t,n){return Wi.__assign(Wi.__assign(Wi.__assign({},Vi.createNode("directive",e)),Ki.createCommentAttachable()),{name:t,parameters:n})};var Qi={__esModule:!0},qi=fi,Ji=gi;Qi.extractPropComments=function(e,t){for(var n=0,r=e.props;n<r.length;n++){var o=r[n],i=t.text[o.origStart];if(i!==qi.PropLeadingCharacter.Comment)throw new Error("Unexpected leading character "+JSON.stringify(i));t.comments.push(Ji.createComment(t.transformRange(o),t.text.slice(o.origStart+1,o.origEnd)))}},Ui.__esModule=!0;var $i=ji,Gi=Qi;Ui.transformDirective=function(e,t){return Gi.extractPropComments(e,t),$i.createDirective(t.transformRange(e.range),e.name,e.parameters)};var Hi={},zi={__esModule:!0},Zi=p,Xi=Fo,es=$o;zi.createDocument=function(e,t,n,r){return Zi.__assign(Zi.__assign(Zi.__assign({},Xi.createNode("document",e)),es.createTrailingCommentAttachable(r)),{children:[t,n]})};var ts={};ts.__esModule=!0,ts.createPosition=function(e,t){return{start:e,end:t}},ts.createEmptyPosition=function(e){return{start:e,end:e}};var ns={},rs={},os={};os.__esModule=!0,os.createEndCommentAttachable=function(e){return void 0===e&&(e=[]),{endComments:e}},rs.__esModule=!0;var is=p,ss=os,as=Fo;rs.createDocumentBody=function(e,t,n){return is.__assign(is.__assign(is.__assign({},as.createNode("documentBody",e)),ss.createEndCommentAttachable(n)),{children:t?[t]:[]})};var cs={};cs.__esModule=!0,cs.getLast=function(e){return e[e.length-1]};var us={};us.__esModule=!0,us.getMatchIndex=function(e,t){var n=e.match(t);return n?n.index:-1},ns.__esModule=!0;var ls=p,fs=rs,hs=cs,ps=us,ds=xo;ns.transformDocumentBody=function(e,t,n){var r,o=e.cstNode,i=function(e,t,n){for(var r=[],o=[],i=[],s=[],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?s.unshift(l):a?r.unshift(l):l.position.start.offset>=e.valueRange.origEnd?i.unshift(l):r.unshift(l)}else a=!0}if(i.length>1)throw new Error("Unexpected multiple document trailing comments at "+ds.getPointText(i[1].position.start));if(s.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+ds.getPointText(s[1].position.start));return{comments:r,endComments:o,documentTrailingComment:hs.getLast(i)||null,documentHeadTrailingComment:hs.getLast(s)||null}}(o,t,n),s=i.comments,a=i.endComments,c=i.documentTrailingComment,u=i.documentHeadTrailingComment,l=t.transformNode(e.contents),f=function(e,t,n){var r=ps.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 i=n.transformRange({origStart:null!==t?t.position.start.offset:o,origEnd:o}),s=-1===r?i.end:n.transformOffset(e.valueRange.origEnd+3);return{position:i,documentEndPoint:s}}(o,l,t),h=f.position,p=f.documentEndPoint;return(r=t.comments).push.apply(r,ls.__spreadArrays(s,a)),{documentBody:fs.createDocumentBody(h,l,a),documentEndPoint:p,documentTrailingComment:c,documentHeadTrailingComment:u}};var gs={},ms={__esModule:!0},ys=p,vs=os,ws=Fo,_s=$o;ms.createDocumentHead=function(e,t,n,r){return ys.__assign(ys.__assign(ys.__assign(ys.__assign({},ws.createNode("documentHead",e)),vs.createEndCommentAttachable(n)),_s.createTrailingCommentAttachable(r)),{children:t})},gs.__esModule=!0;var Es=p,bs=ms,Ss=us;gs.transformDocumentHead=function(e,t){var n,r=e.cstNode,o=function(e,t){for(var n=[],r=[],o=[],i=!1,s=e.directives.length-1;s>=0;s--){var a=t.transformNode(e.directives[s]);"comment"===a.type?i?r.unshift(a):o.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:o}}(r,t),i=o.directives,s=o.comments,a=o.endComments,c=function(e,t,n){var r=Ss.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,i,t),u=c.position,l=c.endMarkerPoint;return(n=t.comments).push.apply(n,Es.__spreadArrays(s,a)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),bs.createDocumentHead(u,i,a,e)},documentHeadEndMarkerPoint:l}},Hi.__esModule=!0;var As=zi,Ms=ts,Os=ns,Ls=gs;Hi.transformDocument=function(e,t){var n=Ls.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,o=n.documentHeadEndMarkerPoint,i=Os.transformDocumentBody(e,t,o),s=i.documentBody,a=i.documentEndPoint,c=i.documentTrailingComment,u=r(i.documentHeadTrailingComment);return c&&t.comments.push(c),As.createDocument(Ms.createPosition(u.position.start,a),u,s,c)};var Ns={},Ts={},Cs={__esModule:!0},Ps=p,xs=qo,Rs=os,Is=Fo;Cs.createFlowCollection=function(e,t,n){return Ps.__assign(Ps.__assign(Ps.__assign(Ps.__assign(Ps.__assign({},Is.createNode("flowCollection",e)),xs.createCommentAttachable()),Rs.createEndCommentAttachable()),t),{children:n})},Ts.__esModule=!0;var ks=p,Bs=Cs;Ts.createFlowMapping=function(e,t,n){return ks.__assign(ks.__assign({},Bs.createFlowCollection(e,t,n)),{type:"flowMapping"})};var Ys={__esModule:!0},Ds=p,Fs=Jo,Us=Fo;Ys.createFlowMappingItem=function(e,t,n){return Ds.__assign(Ds.__assign(Ds.__assign({},Us.createNode("flowMappingItem",e)),Fs.createLeadingCommentAttachable()),{children:[t,n]})};var js={};js.__esModule=!0,js.extractComments=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];i&&"type"in i&&"COMMENT"===i.type?t.comments.push(t.transformNode(i)):n.push(i)}return n};var Ws={};Ws.__esModule=!0,Ws.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]}};var Ks={},Vs={};Vs.__esModule=!0,Vs.createSlicer=function(e,t){var n=t;return function(t){return e.slice(n,n=t)}},Ks.__esModule=!0;var Qs=Vs;Ks.groupCstFlowCollectionItems=function(e){for(var t=[],n=Qs.createSlicer(e,1),r=!1,o=1;o<e.length-1;o++){var i=e[o];"char"in i&&","===i.char?(t.push(n(o)),n(o+1),r=!1):r=!0}return r&&t.push(n(e.length-1)),t};var qs={},Js={__esModule:!0},$s=p,Gs=os,Hs=Fo,zs=$o;Js.createMappingKey=function(e,t){return $s.__assign($s.__assign($s.__assign($s.__assign({},Hs.createNode("mappingKey",e)),zs.createTrailingCommentAttachable()),Gs.createEndCommentAttachable()),{children:t?[t]:[]})};var Zs={__esModule:!0},Xs=p,ea=qo,ta=os,na=Fo;Zs.createMappingValue=function(e,t){return Xs.__assign(Xs.__assign(Xs.__assign(Xs.__assign({},na.createNode("mappingValue",e)),ea.createCommentAttachable()),ta.createEndCommentAttachable()),{children:t?[t]:[]})},qs.__esModule=!0;var ra=Js,oa=Zs,ia=ts;qs.transformAstPair=function(e,t,n,r,o){var i=t.transformNode(e.key),s=t.transformNode(e.value),a=i||r?ra.createMappingKey(t.transformRange({origStart:r?r.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:r.origStart+1}),i):null,c=s||o?oa.createMappingValue(t.transformRange({origStart:o?o.origStart:s.position.start.offset,origEnd:s?s.position.end.offset:o.origStart+1}),s):null;return n(ia.createPosition(a?a.position.start:c.position.start,c?c.position.end:a.position.end),a||ra.createMappingKey(ia.createEmptyPosition(c.position.start),null),c||oa.createMappingValue(ia.createEmptyPosition(a.position.end),null))},Ns.__esModule=!0;var sa=Ts,aa=Ys,ca=js,ua=Ws,la=cs,fa=Ks,ha=qs;Ns.transformFlowMap=function(e,t){var n=ca.extractComments(e.cstNode.items,t),r=fa.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){var o=r[n],i=ua.getFlowMapItemAdditionalRanges(o),s=i.additionalKeyRange,a=i.additionalValueRange;return ha.transformAstPair(e,t,aa.createFlowMappingItem,s,a)})),i=n[0],s=la.getLast(n);return sa.createFlowMapping(t.transformRange({origStart:i.origOffset,origEnd:s.origOffset+1}),t.transformContent(e),o)};var pa={},da={__esModule:!0},ga=p,ma=Cs;da.createFlowSequence=function(e,t,n){return ga.__assign(ga.__assign({},ma.createFlowCollection(e,t,n)),{type:"flowSequence"})};var ya={__esModule:!0},va=p,wa=Fo;ya.createFlowSequenceItem=function(e,t){return va.__assign(va.__assign({},wa.createNode("flowSequenceItem",e)),{children:[t]})},pa.__esModule=!0;var _a=Ys,Ea=da,ba=ya,Sa=ts,Aa=js,Ma=Ws,Oa=cs,La=Ks,Na=qs;pa.transformFlowSeq=function(e,t){var n=Aa.extractComments(e.cstNode.items,t),r=La.groupCstFlowCollectionItems(n),o=e.items.map((function(e,n){if("PAIR"!==e.type){var o=t.transformNode(e);return ba.createFlowSequenceItem(Sa.createPosition(o.position.start,o.position.end),o)}var i=r[n],s=Ma.getFlowMapItemAdditionalRanges(i),a=s.additionalKeyRange,c=s.additionalValueRange;return Na.transformAstPair(e,t,_a.createFlowMappingItem,a,c)})),i=n[0],s=Oa.getLast(n);return Ea.createFlowSequence(t.transformRange({origStart:i.origOffset,origEnd:s.origOffset+1}),t.transformContent(e),o)};var Ta={},Ca={__esModule:!0},Pa=p,xa=Jo,Ra=Fo;Ca.createMapping=function(e,t,n){return Pa.__assign(Pa.__assign(Pa.__assign(Pa.__assign({},Ra.createNode("mapping",e)),xa.createLeadingCommentAttachable()),t),{children:n})};var Ia={__esModule:!0},ka=p,Ba=Jo,Ya=Fo;Ia.createMappingItem=function(e,t,n){return ka.__assign(ka.__assign(ka.__assign({},Ya.createNode("mappingItem",e)),Ba.createLeadingCommentAttachable()),{children:[t,n]})},Ta.__esModule=!0;var Da=Ca,Fa=Ia,Ua=ts,ja=Vs,Wa=js,Ka=Qi,Va=cs,Qa=qs;Ta.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 Ka.extractPropComments(e,t)}));var r=function(e){for(var t=[],n=ja.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}(Wa.extractComments(n.items,t)),o=e.items.map((function(e,n){var o=r[n],i="MAP_VALUE"===o[0].type?[null,o[0].range]:[o[0].range,1===o.length?null:o[1].range],s=i[0],a=i[1];return Qa.transformAstPair(e,t,Fa.createMappingItem,s,a)}));return Da.createMapping(Ua.createPosition(o[0].position.start,Va.getLast(o).position.end),t.transformContent(e),o)};var qa={},Ja={__esModule:!0},$a=p,Ga=qo,Ha=Fo;Ja.createPlain=function(e,t,n){return $a.__assign($a.__assign($a.__assign($a.__assign({},Ha.createNode("plain",e)),Ga.createCommentAttachable()),t),{value:n})};var za={};za.__esModule=!0,za.findLastCharIndex=function(e,t,n){for(var r=t;r>=0;r--)if(n.test(e[r]))return r;return-1},qa.__esModule=!0;var Za=Ja,Xa=za;qa.transformPlain=function(e,t){var n=e.cstNode;return Za.createPlain(t.transformRange({origStart:n.valueRange.origStart,origEnd:Xa.findLastCharIndex(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)};var ec={},tc={__esModule:!0},nc=p;tc.createQuoteDouble=function(e){return nc.__assign(nc.__assign({},e),{type:"quoteDouble"})};var rc={},oc={__esModule:!0},ic=p,sc=qo,ac=Fo;oc.createQuoteValue=function(e,t,n){return ic.__assign(ic.__assign(ic.__assign(ic.__assign({},ac.createNode("quoteValue",e)),t),sc.createCommentAttachable()),{value:n})},rc.__esModule=!0;var cc=oc;rc.transformAstQuoteValue=function(e,t){var n=e.cstNode;return cc.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)},ec.__esModule=!0;var uc=tc,lc=rc;ec.transformQuoteDouble=function(e,t){return uc.createQuoteDouble(lc.transformAstQuoteValue(e,t))};var fc={},hc={__esModule:!0},pc=p;hc.createQuoteSingle=function(e){return pc.__assign(pc.__assign({},e),{type:"quoteSingle"})},fc.__esModule=!0;var dc=hc,gc=rc;fc.transformQuoteSingle=function(e,t){return dc.createQuoteSingle(gc.transformAstQuoteValue(e,t))};var mc={},yc={__esModule:!0},vc=p,wc=os,_c=Jo,Ec=Fo;yc.createSequence=function(e,t,n){return vc.__assign(vc.__assign(vc.__assign(vc.__assign(vc.__assign({},Ec.createNode("sequence",e)),_c.createLeadingCommentAttachable()),wc.createEndCommentAttachable()),t),{children:n})};var bc={__esModule:!0},Sc=p,Ac=qo,Mc=os,Oc=Fo;bc.createSequenceItem=function(e,t){return Sc.__assign(Sc.__assign(Sc.__assign(Sc.__assign({},Oc.createNode("sequenceItem",e)),Ac.createCommentAttachable()),Mc.createEndCommentAttachable()),{children:t?[t]:[]})},mc.__esModule=!0;var Lc=ts,Nc=yc,Tc=bc,Cc=js,Pc=Qi,xc=cs;mc.transformSeq=function(e,t){var n=Cc.extractComments(e.cstNode.items,t).map((function(n,r){Pc.extractPropComments(n,t);var o=t.transformNode(e.items[r]);return Tc.createSequenceItem(Lc.createPosition(t.transformOffset(n.valueRange.origStart),null===o?t.transformOffset(n.valueRange.origStart+1):o.position.end),o)}));return Nc.createSequence(Lc.createPosition(n[0].position.start,xc.getLast(n).position.end),t.transformContent(e),n)},Ko.__esModule=!0;var Rc=Vo,Ic=ni,kc=Ri,Bc=Di,Yc=Ui,Dc=Hi,Fc=Ns,Uc=pa,jc=Ta,Wc=qa,Kc=ec,Vc=fc,Qc=mc;Ko.transformNode=function(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return Rc.transformAlias(e,t);case"BLOCK_FOLDED":return Ic.transformBlockFolded(e,t);case"BLOCK_LITERAL":return kc.transformBlockLiteral(e,t);case"COMMENT":return Bc.transformComment(e,t);case"DIRECTIVE":return Yc.transformDirective(e,t);case"DOCUMENT":return Dc.transformDocument(e,t);case"FLOW_MAP":return Fc.transformFlowMap(e,t);case"FLOW_SEQ":return Uc.transformFlowSeq(e,t);case"MAP":return jc.transformMap(e,t);case"PLAIN":return Wc.transformPlain(e,t);case"QUOTE_DOUBLE":return Kc.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return Vc.transformQuoteSingle(e,t);case"SEQ":return Qc.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}};var qc={},Jc={};Jc.__esModule=!0,Jc.createError=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r},qc.__esModule=!0;var $c=Jc;qc.transformError=function(e,t){var n=e.source.range||e.source.valueRange;return $c.createError(e.message,t.text,t.transformRange(n))};var Gc={},Hc={};Hc.__esModule=!0,Hc.createPoint=function(e,t,n){return{offset:e,line:t,column:n}},Gc.__esModule=!0;var zc=Hc;Gc.transformOffset=function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);var n=t.locator.locationForIndex(e);return zc.createPoint(e,n.line+1,n.column+1)};var Zc={__esModule:!0},Xc=ts;Zc.transformRange=function(e,t){return Xc.createPosition(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))};var eu={__esModule:!0};function tu(e,t){if(e&&"object"==typeof e&&true!==t(e))for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if("context"!==o&&"error"!==o){var i=e[o];Array.isArray(i)?i.forEach((function(e){return tu(e,t)})):tu(i,t)}}}eu.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 tu(e,t)}))}};var nu={};nu.__esModule=!0,nu.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};var ru={},ou={};ou.__esModule=!0,ou.createUpdater=function(e,t,n,r){var o=t(e);return function(t){r(o,t)&&n(e,o=t)}},ru.__esModule=!0;var iu=ou,su=cs;function au(e){return e.start}function cu(e,t){e.start=t}function uu(e){return e.end}function lu(e,t){e.end=t}function fu(e,t){return t.offset<e.offset}function hu(e,t){return t.offset>e.offset}ru.updatePositions=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],i=r[1];o.position.start.offset===o.position.end.offset?o.position.start=o.position.end=i.position.start:i.position.start.offset===i.position.end.offset&&(i.position.start=i.position.end=o.position.end)}var s=iu.createUpdater(t.position,au,cu,fu),a=iu.createUpdater(t.position,uu,lu,hu);"endComments"in t&&0!==t.endComments.length&&(s(t.endComments[0].position.start),a(su.getLast(t.endComments).position.end));var c=n.filter((function(e){return null!==e}));if(0!==c.length){var u=c[0],l=su.getLast(c);s(u.position.start),a(l.position.end),"leadingComments"in u&&0!==u.leadingComments.length&&s(u.leadingComments[0].position.start),"tag"in u&&u.tag&&s(u.tag.position.start),"anchor"in u&&u.anchor&&s(u.anchor.position.start),"trailingComment"in l&&l.trailingComment&&a(l.trailingComment.position.end)}}};var pu={},du={},gu={},mu={};const yu={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},vu={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 wu(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 _u(e){let t,n;return"string"==typeof e?(t=wu(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=wu(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function Eu(e,t){if("number"!=typeof e||e<0)return null;const{lineStarts:n,src:r}=_u(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 bu(e,t){const{lineStarts:n,src:r}=_u(t);if(!n||!(e>=1)||e>n.length)return null;const o=n[e-1];let i=n[e];for(;i&&i>o&&"\n"===r[i-1];)--i;return r.slice(o,i)}class Su{static copy(e){return new Su(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 i=o;for(;o<e.length&&!(e[o]>=r);)++o;return this.origEnd=r+o,i}}class Au{static addStringTerminator(e,t,n){if("\n"===n[n.length-1])return n;const r=Au.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!==yu.DIRECTIVES_END&&r!==yu.DOCUMENT_END)return!1;const i=e[t+1],s=e[t+2];if(i!==r||s!==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=Au.endOfIndent(e,n);if(r>n+t)return r;{const t=Au.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:Au.endOfWhiteSpace(e,t):t}static foldNewline(e,t,n){let r=0,o=!1,i="",s=e[t+1];for(;" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":r=0,t+=1,i+="\n";break;case"\t":r<=n&&(o=!0),t=Au.endOfWhiteSpace(e,t+2)-1;break;case" ":r+=1,t+=1}s=e[t+1]}return i||(i=" "),s&&r<=n&&(o=!0),{fold:i,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,yu.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,yu.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||Au.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]===yu.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]!==yu.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[vu.FLOW_MAP,vu.FLOW_SEQ,vu.QUOTE_DOUBLE,vu.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;const e=Eu(this.range.start,this.context.root);if(!e)return;return{start:e,end:Eu(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,yu.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]===yu.COMMENT){const n=Au.endOfLine(t,e+1),r=new Su(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 Au.addStringTerminator(e,t.end,r)}}class Mu extends Error{constructor(e,t,n){if(!(n&&t instanceof Au))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 Su(this.offset,this.offset+1);const t=e&&Eu(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&&function(e,t){let{start:n,end:r}=e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,i=bu(n.line,t);if(!i)return null;let{col:s}=n;if(i.length>o)if(s<=o-10)i=i.substr(0,o-1)+"\u2026";else{const e=Math.round(o/2);i.length>s+e&&(i=i.substr(0,s+e-1)+"\u2026"),s-=i.length-o,i="\u2026"+i.substr(1-o)}let a=1,c="";r&&(r.line===n.line&&s+(r.col-n.col)<=o+1?a=r.col-n.col:(a=Math.min(i.length+1,o)-s,c="\u2026"));const u=s>1?" ".repeat(s-1):"",l="^".repeat(a);return"".concat(i,"\n").concat(u).concat(l).concat(c)}(this.linePos,e);r&&(this.message+=":\n\n".concat(r,"\n"))}delete this.source}}class Ou extends Mu{constructor(e,t){super("YAMLSemanticError",e,t)}}class Lu extends Au{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}=Au.foldNewline(n,r,-1);o+=e,r=t}else if(" "===e||"\t"===e){const i=r;let s=n[r+1];for(;r<t&&(" "===s||"\t"===s);)r+=1,s=n[r+1];"\n"!==s&&(o+=r>i?n.slice(i,r+1):e)}else o+=e}const i=n[e];switch(i){case"\t":return{errors:[new Ou(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":{const e="Plain value cannot start with reserved character ".concat(i);return{errors:[new Ou(this,e)],str:o}}default:return o}}parseBlockValue(e){const{indent:t,inFlow:n,src:r}=this.context;let o=e,i=e;for(let e=r[o];"\n"===e&&!Au.atDocumentBoundary(r,o+1);e=r[o]){const e=Au.endOfBlockIndent(r,t,o+1);if(null===e||"#"===r[e])break;"\n"===r[e]?o=e:(i=Lu.endOfLine(r,e,n),o=i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=i,i}parse(e,t){this.context=e;const{inFlow:n,src:r}=e;let o=t;const i=r[o];return i&&"#"!==i&&"\n"!==i&&(o=Lu.endOfLine(r,t,n)),this.valueRange=new Su(t,o),o=Au.endOfWhiteSpace(r,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}mu.Char=yu,mu.Node=Au,mu.PlainValue=Lu,mu.Range=Su,mu.Type=vu,mu.YAMLError=Mu,mu.YAMLReferenceError=class extends Mu{constructor(e,t){super("YAMLReferenceError",e,t)}},mu.YAMLSemanticError=Ou,mu.YAMLSyntaxError=class extends Mu{constructor(e,t){super("YAMLSyntaxError",e,t)}},mu.YAMLWarning=class extends Mu{constructor(e,t){super("YAMLWarning",e,t)}},mu._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},mu.defaultTagPrefix="tag:yaml.org,2002:",mu.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};var Nu=mu;class Tu extends Nu.Node{constructor(){super(Nu.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,t){return this.context=e,this.range=new Nu.Range(t,t+1),t+1}}class Cu extends Nu.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:i}=e;o||this.type!==Nu.Type.SEQ_ITEM||(this.error=new Nu.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));const s=o?t-i:e.indent;let a=Nu.Node.endOfWhiteSpace(r,t+1),c=r[a];const u="#"===c,l=[];let f=null;for(;"\n"===c||"#"===c;){if("#"===c){const e=Nu.Node.endOfLine(r,a+1);l.push(new Nu.Range(a,e)),a=e}else{o=!0,i=a+1;"\n"===r[Nu.Node.endOfWhiteSpace(r,i)]&&0===l.length&&(f=new Tu,i=f.parse({src:r},i)),a=Nu.Node.endOfIndent(r,i)}c=r[a]}if(Nu.Node.nextNodeIsIndented(c,a-(i+s),this.type!==Nu.Type.SEQ_ITEM)?this.node=n({atLineStart:o,inCollection:!1,indent:s,lineStart:i,parent:this},a):c&&i>t+1&&(a=i-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=Nu.Node.endOfLine(r,t+1);const h=this.node?this.node.valueRange.end:a;return this.valueRange=new Nu.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 Nu.Node.addStringTerminator(e,n.end,o)}}class Pu extends Nu.Node{constructor(){super(Nu.Type.COMMENT)}parse(e,t){this.context=e;const n=this.parseComment(t);return this.range=new Nu.Range(t,n),n}}function xu(e){let t=e;for(;t instanceof Cu;)t=t.node;if(!(t instanceof Ru))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===Nu.Type.COMMENT){const{indent:t,lineStart:o}=n.context;if(t>0&&n.range.start>=o+t)break;r=e}else{if(n.type!==Nu.Type.BLANK_LINE)break;r=e}}if(-1===r)return null;const o=t.items.splice(r,n-r),i=o[0].range.start;for(;t.range.end=i,t.valueRange&&t.valueRange.end>i&&(t.valueRange.end=i),t!==e;)t=t.context.parent;return o}class Ru extends Nu.Node{static nextContentHasIndent(e,t,n){const r=Nu.Node.endOfLine(e,t)+1,o=e[t=Nu.Node.endOfWhiteSpace(e,r)];return!!o&&(t>=r+n||("#"===o||"\n"===o)&&Ru.nextContentHasIndent(e,t,n))}constructor(e){super(e.type===Nu.Type.SEQ_ITEM?Nu.Type.SEQ:Nu.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=xu(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=Nu.Node.startOfLine(r,t);const i=this.items[0];i.context.parent=this,this.valueRange=Nu.Range.copy(i.valueRange);const s=i.range.start-i.context.lineStart;let a=t;a=Nu.Node.normalizeOffset(r,a);let c=r[a],u=Nu.Node.endOfWhiteSpace(r,o)===a,l=!1;for(;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!l){const e=new Tu;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+s&&!Ru.nextContentHasIndent(r,a,s))return a;const e=new Pu;if(a=e.parse({indent:s,lineStart:o,src:r},a),this.items.push(e),this.valueRange.end=a,a>=r.length){c=null;break}}if(o=a+1,a=Nu.Node.endOfIndent(r,o),Nu.Node.atBlank(r,a)){const e=Nu.Node.endOfWhiteSpace(r,a),t=r[e];t&&"\n"!==t&&"#"!==t||(a=e)}c=r[a],u=!0}if(!c)break;if(a!==o+s&&(u||":"!==c)){if(a<o+s){o>t&&(a=o);break}if(!this.error){const e="All collection items must start at the same column";this.error=new Nu.YAMLSyntaxError(this,e)}}if(i.type===Nu.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 Nu.YAMLSyntaxError(this,e)}}const e=n({atLineStart:u,inCollection:!0,indent:s,lineStart:o,parent:this},a);if(!e)return a;if(this.items.push(e),this.valueRange.end=e.valueRange.end,a=Nu.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=xu(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:i}=n.context;if(r)for(let e=0;e<i;++e)o+=" ";o+=String(n)}return Nu.Node.addStringTerminator(e,n.end,o)}}class Iu extends Nu.Node{constructor(){super(Nu.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 Nu.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 Nu.Range(t,n),n}}class ku extends Nu.Node{static startCommentOrEndBlankLine(e,t){const n=Nu.Node.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}constructor(){super(Nu.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(;!Nu.Node.atDocumentBoundary(t,o,Nu.Char.DIRECTIVES_END);)switch(o=ku.startCommentOrEndBlankLine(t,o),t[o]){case"\n":if(n){const e=new Tu;o=e.parse({src:t},o),o<t.length&&this.directives.push(e)}else o+=1,n=!0;break;case"#":{const e=new Pu;o=e.parse({src:t},o),this.directives.push(e),n=!1}break;case"%":{const e=new Iu;o=e.parse({parent:this,src:t},o),this.directives.push(e),r=!0,n=!1}break;default:return r?this.error=new Nu.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new Nu.Range(o,o+3),o+3):(r?this.error=new Nu.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=Nu.Node.endOfWhiteSpace(n,e),i=r===e;for(this.valueRange=new Nu.Range(o);!Nu.Node.atDocumentBoundary(n,o,Nu.Char.DOCUMENT_END);){switch(n[o]){case"\n":if(i){const e=new Tu;o=e.parse({src:n},o),o<n.length&&this.contents.push(e)}else o+=1,i=!0;r=o;break;case"#":{const e=new Pu;o=e.parse({src:n},o),this.contents.push(e),i=!1}break;default:{const e=Nu.Node.endOfIndent(n,o),s=t({atLineStart:i,indent:-1,inFlow:!1,inCollection:!1,lineStart:r,parent:this},e);if(!s)return this.valueRange.end=e;this.contents.push(s),o=s.range.end,i=!1;const a=xu(s);a&&Array.prototype.push.apply(this.contents,a)}}o=ku.startCommentOrEndBlankLine(n,o)}if(this.valueRange.end=o,n[o]&&(this.documentEndMarker=new Nu.Range(o,o+3),o+=3,n[o])){if(o=Nu.Node.endOfWhiteSpace(n,o),"#"===n[o]){const e=new Pu;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 Nu.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===Nu.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}class Bu extends Nu.Node{parse(e,t){this.context=e;const{src:n}=e;let r=Nu.Node.endOfIdentifier(n,t+1);return this.valueRange=new Nu.Range(t+1,r),r=Nu.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}const Yu="CLIP",Du="KEEP",Fu="STRIP";class Uu extends Nu.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=Yu,this.header=null}get includesTrailingLines(){return this.chomping===Du}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,i=r[t-1];for(;"\n"===i||"\t"===i||" "===i;){if(t-=1,t<=e){if(this.chomping===Du)break;return""}"\n"===i&&(o=t),i=r[t-1]}let s=t+1;o&&(this.chomping===Du?(s=o,t=this.valueRange.end):t=o);const a=n+this.blockIndent,c=this.type===Nu.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=Nu.Node.endOfLine(r,n),i=r.slice(n,o);n=o,c&&(" "===e||"\t"===e)&&n<s?(" "===f?f="\n":h||u||"\n"!==f||(f="\n\n"),l+=f+i,f=o<t&&r[o]||"",h=!0):(l+=f+i,f=c&&n<s?" ":"\n",h=!1),u&&""!==i&&(u=!1)}}return this.chomping===Fu?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=Fu;break;case"+":this.chomping=Du;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 Nu.Range(e,n),n}n+=1}}parseBlockValue(e){const{indent:t,src:n}=this.context,r=!!this.blockIndent;let o=e,i=e,s=1;for(let e=n[o];"\n"===e&&(o+=1,!Nu.Node.atDocumentBoundary(n,o));e=n[o]){const e=Nu.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 Nu.YAMLSemanticError(this,e)}}}else if("\n"!==n[e]){if(c<s){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new Nu.YAMLSemanticError(this,e)}this.blockIndent=c}else c>s&&(s=c);o="\n"===n[e]?e:i=Nu.Node.endOfLine(n,e)}return this.chomping!==Du&&(o=n[i]?i+1:i),this.valueRange=new Nu.Range(e+1,o),o}parse(e,t){this.context=e;const{src:n}=e;let r=this.parseBlockHeader(t);return r=Nu.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 ju extends Nu.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length;const t=this.items[e-1];return!!t&&(t.jsonLike||t.type===Nu.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,t){this.context=e;const{parseNode:n,src:r}=e;let{indent:o,lineStart:i}=e,s=r[t];this.items=[{char:s,offset:t}];let a=Nu.Node.endOfWhiteSpace(r,t+1);for(s=r[a];s&&"]"!==s&&"}"!==s;){switch(s){case"\n":i=a+1;if("\n"===r[Nu.Node.endOfWhiteSpace(r,i)]){const e=new Tu;i=e.parse({src:r},i),this.items.push(e)}if(a=Nu.Node.endOfIndent(r,i),a<=i+o&&(s=r[a],a<i+o||"]"!==s&&"}"!==s)){const e="Insufficient indentation in flow collection";this.error=new Nu.YAMLSemanticError(this,e)}break;case",":this.items.push({char:s,offset:a}),a+=1;break;case"#":{const e=new Pu;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||":"===s&&this.prevNodeIsJsonLike()){this.items.push({char:s,offset:a}),a+=1;break}}default:{const e=n({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:i,parent:this},a);if(!e)return this.valueRange=new Nu.Range(t,a),a;this.items.push(e),a=Nu.Node.normalizeOffset(r,e.range.end)}}a=Nu.Node.endOfWhiteSpace(r,a),s=r[a]}return this.valueRange=new Nu.Range(t,a+1),s&&(this.items.push({char:s,offset:a}),a=Nu.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 Nu.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 Nu.Node));let i="",s=n.start;return o.forEach((t=>{const n=e.slice(s,t.range.start);s=t.range.end,i+=n+String(t),"\n"===i[i.length-1]&&"\n"!==e[s-1]&&"\n"===e[s]&&(s+=1)})),i+=e.slice(s,n.end),Nu.Node.addStringTerminator(e,n.end,i)}}class Wu extends Nu.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 Nu.YAMLSyntaxError(this,'Missing closing "quote'));let i="";for(let s=t+1;s<n-1;++s){const t=o[s];if("\n"===t){Nu.Node.atDocumentBoundary(o,s+1)&&e.push(new Nu.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Nu.Node.foldNewline(o,s,r);i+=t,s=n,a&&e.push(new Nu.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===t)switch(s+=1,o[s]){case"0":i+="\0";break;case"a":i+="\x07";break;case"b":i+="\b";break;case"e":i+="\x1b";break;case"f":i+="\f";break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":case"\t":i+="\t";break;case"v":i+="\v";break;case"N":i+="\x85";break;case"_":i+="\xa0";break;case"L":i+="\u2028";break;case"P":i+="\u2029";break;case" ":i+=" ";break;case'"':i+='"';break;case"/":i+="/";break;case"\\":i+="\\";break;case"x":i+=this.parseCharCode(s+1,2,e),s+=2;break;case"u":i+=this.parseCharCode(s+1,4,e),s+=4;break;case"U":i+=this.parseCharCode(s+1,8,e),s+=8;break;case"\n":for(;" "===o[s+1]||"\t"===o[s+1];)s+=1;break;default:e.push(new Nu.YAMLSyntaxError(this,"Invalid escape sequence ".concat(o.substr(s-1,2)))),i+="\\"+o[s]}else if(" "===t||"\t"===t){const e=s;let n=o[s+1];for(;" "===n||"\t"===n;)s+=1,n=o[s+1];"\n"!==n&&(i+=s>e?o.slice(e,s+1):t)}else i+=t}return e.length>0?{errors:e,str:i}:i}parseCharCode(e,t,n){const{src:r}=this.context,o=r.substr(e,t),i=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(i)?(n.push(new Nu.YAMLSyntaxError(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(i)}parse(e,t){this.context=e;const{src:n}=e;let r=Wu.endOfQuote(n,t+1);return this.valueRange=new Nu.Range(t,r),r=Nu.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class Ku extends Nu.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 Nu.YAMLSyntaxError(this,"Missing closing 'quote"));let i="";for(let s=t+1;s<n-1;++s){const t=o[s];if("\n"===t){Nu.Node.atDocumentBoundary(o,s+1)&&e.push(new Nu.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));const{fold:t,offset:n,error:a}=Nu.Node.foldNewline(o,s,r);i+=t,s=n,a&&e.push(new Nu.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===t)i+=t,s+=1,"'"!==o[s]&&e.push(new Nu.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===t||"\t"===t){const e=s;let n=o[s+1];for(;" "===n||"\t"===n;)s+=1,n=o[s+1];"\n"!==n&&(i+=s>e?o.slice(e,s+1):t)}else i+=t}return e.length>0?{errors:e,str:i}:i}parse(e,t){this.context=e;const{src:n}=e;let r=Ku.endOfQuote(n,t+1);return this.valueRange=new Nu.Range(t,r),r=Nu.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r}}class Vu{static parseType(e,t,n){switch(e[t]){case"*":return Nu.Type.ALIAS;case">":return Nu.Type.BLOCK_FOLDED;case"|":return Nu.Type.BLOCK_LITERAL;case"{":return Nu.Type.FLOW_MAP;case"[":return Nu.Type.FLOW_SEQ;case"?":return!n&&Nu.Node.atBlank(e,t+1,!0)?Nu.Type.MAP_KEY:Nu.Type.PLAIN;case":":return!n&&Nu.Node.atBlank(e,t+1,!0)?Nu.Type.MAP_VALUE:Nu.Type.PLAIN;case"-":return!n&&Nu.Node.atBlank(e,t+1,!0)?Nu.Type.SEQ_ITEM:Nu.Type.PLAIN;case'"':return Nu.Type.QUOTE_DOUBLE;case"'":return Nu.Type.QUOTE_SINGLE;default:return Nu.Type.PLAIN}}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{atLineStart:t,inCollection:n,inFlow:r,indent:o,lineStart:i,parent:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Nu._defineProperty(this,"parseNode",((e,t)=>{if(Nu.Node.atDocumentBoundary(this.src,t))return null;const n=new Vu(this,e),{props:r,type:o,valueStart:i}=n.parseProps(t),s=function(e,t){switch(e){case Nu.Type.ALIAS:return new Bu(e,t);case Nu.Type.BLOCK_FOLDED:case Nu.Type.BLOCK_LITERAL:return new Uu(e,t);case Nu.Type.FLOW_MAP:case Nu.Type.FLOW_SEQ:return new ju(e,t);case Nu.Type.MAP_KEY:case Nu.Type.MAP_VALUE:case Nu.Type.SEQ_ITEM:return new Cu(e,t);case Nu.Type.COMMENT:case Nu.Type.PLAIN:return new Nu.PlainValue(e,t);case Nu.Type.QUOTE_DOUBLE:return new Wu(e,t);case Nu.Type.QUOTE_SINGLE:return new Ku(e,t);default:return null}}(o,r);let a=s.parse(n,i);if(s.range=new Nu.Range(t,a),a<=t&&(s.error=new Error("Node#parse consumed no characters"),s.error.parseEnd=a,s.error.source=s,s.range.end=t+1),n.nodeStartsCollection(s)){s.error||n.atLineStart||n.parent.type!==Nu.Type.DOCUMENT||(s.error=new Nu.YAMLSyntaxError(s,"Block collection must not have preceding content here (e.g. directives-end indicator)"));const e=new Ru(s);return a=e.parse(new Vu(n),a),e.range=new Nu.Range(t,a),e}return s})),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!=i?i:e.lineStart,this.parent=null!=s?s: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 Cu)return!0;let o=e.range.end;return"\n"!==r[o]&&"\n"!==r[o-1]&&(o=Nu.Node.endOfWhiteSpace(r,o),":"===r[o])}parseProps(e){const{inFlow:t,parent:n,src:r}=this,o=[];let i=!1,s=r[e=this.atLineStart?Nu.Node.endOfIndent(r,e):Nu.Node.endOfWhiteSpace(r,e)];for(;s===Nu.Char.ANCHOR||s===Nu.Char.COMMENT||s===Nu.Char.TAG||"\n"===s;){if("\n"===s){let t,o=e;do{t=o+1,o=Nu.Node.endOfIndent(r,t)}while("\n"===r[o]);const s=o-(t+this.indent),a=n.type===Nu.Type.SEQ_ITEM&&n.context.atLineStart;if("#"!==r[o]&&!Nu.Node.nextNodeIsIndented(r[o],s,!a))break;this.atLineStart=!0,this.lineStart=t,i=!1,e=o}else if(s===Nu.Char.COMMENT){const t=Nu.Node.endOfLine(r,e+1);o.push(new Nu.Range(e,t)),e=t}else{let t=Nu.Node.endOfIdentifier(r,e+1);s===Nu.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=Nu.Node.endOfIdentifier(r,t+5)),o.push(new Nu.Range(e,t)),i=!0,e=Nu.Node.endOfWhiteSpace(r,t)}s=r[e]}i&&":"===s&&Nu.Node.atBlank(r,e+1,!0)&&(e-=1);return{props:o,type:Vu.parseType(r,e,t),valueStart:e}}}gu.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 ku,o=new Vu({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};var Qu={},qu={},Ju=mu;function $u(e,t,n){return n?-1===n.indexOf("\n")?"".concat(e," #").concat(n):"".concat(e,"\n")+n.replace(/^/gm,"".concat(t||"","#")):e}class Gu{}function Hu(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>Hu(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 zu extends Gu{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:Hu(this.value,e,t)}toString(){return String(this.value)}}function Zu(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 Xu=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done;class el extends Gu{constructor(e){super(),Ju._defineProperty(this,"items",[]),this.schema=e}addIn(e,t){if(Xu(e))this.add(t);else{const[n,...r]=e,o=this.get(n,!0);if(o instanceof el)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,Zu(this.schema,r,t))}}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);const r=this.get(t,!0);if(r instanceof el)return r.deleteIn(n);throw new Error("Expected YAML collection at ".concat(t,". Remaining path: ").concat(n))}getIn(e,t){let[n,...r]=e;const o=this.get(n,!0);return 0===r.length?!t&&o instanceof zu?o.value:o:o instanceof el?o.getIn(r,t):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;const t=e.value;return null==t||t instanceof zu&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);const r=this.get(t,!0);return r instanceof el&&r.hasIn(n)}setIn(e,t){let[n,...r]=e;if(0===r.length)this.set(n,t);else{const e=this.get(n,!0);if(e instanceof el)e.setIn(r,t);else{if(void 0!==e||!this.schema)throw new Error("Expected YAML collection at ".concat(n,". Remaining path: ").concat(r));this.set(n,Zu(this.schema,r,t))}}}toJSON(){return null}toString(e,t,n,r){let{blockItem:o,flowChars:i,isMap:s,itemIndent:a}=t;const{indent:c,indentStep:u,stringify:l}=e,f=this.type===Ju.Type.FLOW_MAP||this.type===Ju.Type.FLOW_SEQ||e.inFlow;f&&(a+=u);const h=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:h,indent:a,inFlow:f,type:null});let p=!1,d=!1;const g=this.items.reduce(((t,n,r)=>{let o;n&&(!p&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((e=>{t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(o=n.comment),f&&(!p&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(d=!0)),p=!1;let i=l(n,e,(()=>o=null),(()=>p=!0));return f&&!d&&i.includes("\n")&&(d=!0),f&&r<this.items.length-1&&(i+=","),i=$u(i,a,o),p&&(o||f)&&(p=!1),t.push({type:"item",str:i}),t}),[]);let m;if(0===g.length)m=i.start+i.end;else if(f){const{start:e,end:t}=i,n=g.map((e=>e.str));if(d||n.reduce(((e,t)=>e+t.length+2),2)>el.maxFlowStringSingleLineLength){m=e;for(const e of n)m+=e?"\n".concat(u).concat(c).concat(e):"\n";m+="\n".concat(c).concat(t)}else m="".concat(e," ").concat(n.join(" ")," ").concat(t)}else{const e=g.map(o);m=e.shift();for(const t of e)m+=t?"\n".concat(c).concat(t):"\n"}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(c,"#")),n&&n()):p&&r&&r(),m}}function tl(e){let t=e instanceof zu?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}Ju._defineProperty(el,"maxFlowStringSingleLineLength",60);class nl extends el{add(e){this.items.push(e)}delete(e){const t=tl(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=tl(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&r instanceof zu?r.value:r}has(e){const t=tl(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=tl(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(Hu(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 rl extends Gu{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(),this.key=e,this.value=t,this.type=rl.Type.PAIR}get commentBefore(){return this.key instanceof Gu?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new zu(null)),!(this.key instanceof Gu)){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=Hu(this.key,"",e);if(t instanceof Map){const r=Hu(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 Gu&&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=Hu(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:i}=e.doc.options;let{key:s,value:a}=this,c=s instanceof Gu&&s.comment;if(i){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(s instanceof el){throw new Error("With simple keys, collection cannot be used as a key value")}}let u=!i&&(!s||c||(s instanceof Gu?s instanceof el||s.type===Ju.Type.BLOCK_FOLDED||s.type===Ju.Type.BLOCK_LITERAL:"object"==typeof s));const{doc:l,indent:f,indentStep:h,stringify:p}=e;e=Object.assign({},e,{implicitKey:!u,indent:f+h});let d=!1,g=p(s,e,(()=>c=null),(()=>d=!0));if(g=$u(g,e.indent,c),!u&&g.length>1024){if(i)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");u=!0}if(e.allNullValues&&!i)return this.comment?(g=$u(g,e.indent,this.comment),t&&t()):d&&!c&&n&&n(),e.inFlow&&!u?g:"? ".concat(g);g=u?"? ".concat(g,"\n").concat(f,":"):"".concat(g,":"),this.comment&&(g=$u(g,e.indent,this.comment),t&&t());let m="",y=null;if(a instanceof Gu){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 zu&&(e.indentAtStart=g.length+1),d=!1,!o&&r>=2&&!e.inFlow&&!u&&a instanceof nl&&a.type!==Ju.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 w=" ";if(m||this.comment)w="".concat(m,"\n").concat(e.indent);else if(!u&&a instanceof el){("["===v[0]||"{"===v[0])&&!v.includes("\n")||(w="\n".concat(e.indent))}else"\n"===v[0]&&(w="");return d&&!y&&n&&n(),$u(g+w+v,e.indent,y)}}Ju._defineProperty(rl,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const ol=(e,t)=>{if(e instanceof il){const n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof el){let n=0;for(const r of e.items){const e=ol(r,t);e>n&&(n=e)}return n}if(e instanceof rl){const n=ol(e.key,t),r=ol(e.value,t);return Math.max(n,r)}return 1};class il extends Gu{static stringify(e,t){let{range:n,source:r}=e,{anchors:o,doc:i,implicitKey:s,inStringifyKey:a}=t,c=Object.keys(o).find((e=>o[e]===r));if(!c&&a&&(c=i.anchors.getName(r)||i.anchors.newName()),c)return"*".concat(c).concat(s?" ":"");const u=i.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(u," [").concat(n,"]"))}constructor(e){super(),this.source=e,this.type=Ju.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return Hu(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 Ju.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=ol(this.source,n)),o.count*o.aliasCount>r)){const e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new Ju.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return o.res}toString(e){return il.stringify(this,e)}}function sl(e,t){const n=t instanceof zu?t.value:t;for(const r of e)if(r instanceof rl){if(r.key===t||r.key===n)return r;if(r.key&&r.key.value===n)return r}}Ju._defineProperty(il,"default",!0);class al extends el{add(e,t){e?e instanceof rl||(e=new rl(e.key||e,e.value)):e=new rl(e);const n=sl(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=sl(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=sl(this.items,e),r=n&&n.value;return!t&&r instanceof zu?r.value:r}has(e){return!!sl(this.items,e)}set(e,t){this.add(new rl(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 rl))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 cl extends rl{constructor(e){if(e instanceof rl){let t=e.value;t instanceof nl||(t=new nl,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new zu("<<"),new nl);this.type=rl.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:n}of this.value.items){if(!(n instanceof al))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 ul={defaultType:Ju.Type.BLOCK_LITERAL,lineWidth:76},ll={defaultType:Ju.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function fl(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 zu||(e=new zu(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new zu(e)}const hl=(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 pl(e,t,n,r){let{indentAtStart:o,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:c}=r;if(!i||i<0)return e;const u=Math.max(1+s,1+i-t.length);if(e.length<=u)return e;const l=[],f={};let h,p,d=i-t.length;"number"==typeof o&&(o>i-Math.max(2,s)?l.push(0):d=i-o);let g,m=!1,y=-1,v=-1,w=-1;for("block"===n&&(y=hl(e,y),-1!==y&&(d=y+u));g=e[y+=1];){if("quoted"===n&&"\\"===g){switch(v=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}w=y}if("\n"===g)"block"===n&&(y=hl(e,y)),d=y+u,h=void 0;else{if(" "===g&&p&&" "!==p&&"\n"!==p&&"\t"!==p){const t=e[y+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(h=y)}if(y>=d)if(h)l.push(h),d=h+u,h=void 0;else if("quoted"===n){for(;" "===p||"\t"===p;)p=g,g=e[y+=1],m=!0;const t=y>w+1?y-2:v-1;if(f[t])return e;l.push(t),f[t]=!0,d=t+u,h=void 0}else m=!0}p=g}if(m&&c&&c(),0===l.length)return e;a&&a();let _=e.slice(0,l[0]);for(let r=0;r<l.length;++r){const o=l[r],i=l[r+1]||e.length;0===o?_="\n".concat(t).concat(e.slice(0,i)):("quoted"===n&&f[o]&&(_+="".concat(e[o],"\\")),_+="\n".concat(t).concat(e.slice(o+1,i)))}return _}const dl=e=>{let{indentAtStart:t}=e;return t?Object.assign({indentAtStart:t},ll.fold):ll.fold},gl=e=>/^(%|---|\.\.\.)/m.test(e);function ml(e,t){const{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:o}=ll.doubleQuoted,i=JSON.stringify(e);if(r)return i;const s=t.indent||(gl(e)?" ":"");let a="",c=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(a+=i.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{a+=i.slice(c,e);const t=i.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=i.substr(e,6)}e+=5,c=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<o)e+=1;else{for(a+=i.slice(c,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)a+="\n",e+=2;a+=s," "===i[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+i.slice(c):i,n?a:pl(a,s,"quoted",dl(t))}function yl(e,t){if(t.implicitKey){if(/\n/.test(e))return ml(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return ml(e,t);const n=t.indent||(gl(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,"$&\n".concat(n))+"'";return t.implicitKey?r:pl(r,n,"flow",dl(t))}function vl(e,t,n,r){let{comment:o,type:i,value:s}=e;if(/\n[\t ]+$/.test(s)||/^\s*$/.test(s))return ml(s,t);const a=t.indent||(t.forceBlockIndent||gl(s)?" ":""),c=a?"2":"1",u=i!==Ju.Type.BLOCK_FOLDED&&(i===Ju.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}(s,ll.fold.lineWidth,a.length));let l=u?"|":">";if(!s)return l+"\n";let f="",h="";if(s=s.replace(/[\n\t ]*$/,(e=>{const t=e.indexOf("\n");return-1===t?l+="-":s!==e&&t===e.length-1||(l+="+",r&&r()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(l+=c);const t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,"$&".concat(a))),f&&(f=f.replace(/\n+/g,"$&".concat(a))),o&&(l+=" #"+o.replace(/ ?[\r\n]+/g," "),n&&n()),!s)return"".concat(l).concat(c,"\n").concat(a).concat(h);if(u)return s=s.replace(/\n+/g,"$&".concat(a)),"".concat(l,"\n").concat(a).concat(f).concat(s).concat(h);s=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(a));const p=pl("".concat(f).concat(s).concat(h),a,"block",ll.fold);return"".concat(l,"\n").concat(a).concat(p)}function wl(e,t){let n,r,o;switch(t.type){case Ju.Type.FLOW_MAP:n="}",r="flow map";break;case Ju.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:return void e.push(new Ju.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!==Ju.Type.COMMENT){o=n;break}}if(o&&o.char!==n){const i="Expected ".concat(r," to end with ").concat(n);let s;"number"==typeof o.offset?(s=new Ju.YAMLSemanticError(t,i),s.offset=o.offset+1):(s=new Ju.YAMLSemanticError(o,i),o.range&&o.range.end&&(s.offset=o.range.end-o.range.start)),e.push(s)}}function _l(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 Ju.YAMLSemanticError(t,n))}}function El(e,t){const n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Ju.YAMLSemanticError(e,'The "'.concat(r,'" key is too long'))}function bl(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 Sl(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 Al(e,t){const{tag:n,type:r}=t;let o=!1;if(n){const{handle:r,suffix:i,verbatim:s}=n;if(s){if("!"!==s&&"!!"!==s)return s;const n="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new Ju.YAMLSemanticError(t,n))}else if("!"!==r||i)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 Ju.YAMLSemanticError(t,"The ".concat(n," tag handle is non-default and was not declared."))}if(!r)throw new Ju.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 Ju.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 Ju.Type.BLOCK_FOLDED:case Ju.Type.BLOCK_LITERAL:case Ju.Type.QUOTE_DOUBLE:case Ju.Type.QUOTE_SINGLE:return Ju.defaultTags.STR;case Ju.Type.FLOW_MAP:case Ju.Type.MAP:return Ju.defaultTags.MAP;case Ju.Type.FLOW_SEQ:case Ju.Type.SEQ:return Ju.defaultTags.SEQ;case Ju.Type.PLAIN:return o?Ju.defaultTags.STR:null;default:return null}}function Ml(e,t,n){const{tags:r}=e.schema,o=[];for(const i of r)if(i.tag===n){if(!i.test){const n=i.resolve(e,t);return n instanceof el?n:new zu(n)}o.push(i)}const i=Sl(e,t);return"string"==typeof i&&o.length>0?fl(i,o,r.scalarFallback):null}function Ol(e,t,n){try{const r=Ml(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(e){let{type:t}=e;switch(t){case Ju.Type.FLOW_MAP:case Ju.Type.MAP:return Ju.defaultTags.MAP;case Ju.Type.FLOW_SEQ:case Ju.Type.SEQ:return Ju.defaultTags.SEQ;default:return Ju.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 Ju.YAMLWarning(t,o));const i=Ml(e,t,r);return i.tag=n,i}catch(n){const r=new Ju.YAMLReferenceError(t,n.message);return r.stack=n.stack,e.errors.push(r),null}}function Ll(e,t){const n={before:[],after:[]};let r=!1,o=!1;const i=(e=>{if(!e)return!1;const{type:t}=e;return t===Ju.Type.MAP_KEY||t===Ju.Type.MAP_VALUE||t===Ju.Type.SEQ_ITEM})(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:s,end:a}of i)switch(t.context.src[s]){case Ju.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(s)){const n="Comments must be separated from other tokens by white space characters";e.push(new Ju.YAMLSemanticError(t,n))}const{header:r,valueRange:o}=t;(o&&(s>o.start||r&&s>r.start)?n.after:n.before).push(t.context.src.slice(s+1,a));break}case Ju.Char.ANCHOR:if(r){const n="A node can have at most one anchor";e.push(new Ju.YAMLSemanticError(t,n))}r=!0;break;case Ju.Char.TAG:if(o){const n="A node can have at most one tag";e.push(new Ju.YAMLSemanticError(t,n))}o=!0}return{comments:n,hasAnchor:r,hasTag:o}}function Nl(e,t){if(!t)return null;t.error&&e.errors.push(t.error);const{comments:n,hasAnchor:r,hasTag:o}=Ll(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===Ju.Type.ALIAS&&(r||o)){const n="An alias node must not specify any properties";e.errors.push(new Ju.YAMLSemanticError(t,n))}const i=function(e,t){const{anchors:n,errors:r,schema:o}=e;if(t.type===Ju.Type.ALIAS){const e=t.rawValue,o=n.getNode(e);if(!o){const n="Aliased anchor not found: ".concat(e);return r.push(new Ju.YAMLReferenceError(t,n)),null}const i=new il(o);return n._cstAliases.push(i),i}const i=Al(e,t);if(i)return Ol(e,t,i);if(t.type!==Ju.Type.PLAIN){const e="Failed to resolve ".concat(t.type," node here");return r.push(new Ju.YAMLSyntaxError(t,e)),null}try{return fl(Sl(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(i){i.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(i.cstNode=t),e.options.keepNodeTypes&&(i.type=t.type);const r=n.before.join("\n");r&&(i.commentBefore=i.commentBefore?"".concat(i.commentBefore,"\n").concat(r):r);const o=n.after.join("\n");o&&(i.comment=i.comment?"".concat(i.comment,"\n").concat(o):o)}return t.resolved=i}function Tl(e,t){if(!(e=>{let{context:{lineStart:t,node:n,src:r},props:o}=e;if(0===o.length)return!1;const{start:i}=o[0];if(n&&i>n.valueRange.start)return!1;if(r[i]!==Ju.Char.COMMENT)return!1;for(let e=t;e<i;++e)if("\n"===r[e])return!1;return!0})(e))return;const n=e.getPropValue(0,Ju.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)}qu.Alias=il,qu.Collection=el,qu.Merge=cl,qu.Node=Gu,qu.Pair=rl,qu.Scalar=zu,qu.YAMLMap=al,qu.YAMLSeq=nl,qu.addComment=$u,qu.binaryOptions=ul,qu.boolOptions={trueStr:"true",falseStr:"false"},qu.findPair=sl,qu.intOptions={asBigInt:!1},qu.isEmptyPath=Xu,qu.nullOptions={nullStr:"null"},qu.resolveMap=function(e,t){if(t.type!==Ju.Type.MAP&&t.type!==Ju.Type.FLOW_MAP){const n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new Ju.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===Ju.Type.FLOW_MAP?function(e,t){const n=[],r=[];let o,i=!1,s="{";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&&!i){i=!0,s=":";continue}if(":"===n){if(void 0===o&&(o=null),":"===s){s=",";continue}}else if(i&&(void 0===o&&","!==n&&(o=null),i=!1),void 0!==o&&(r.push(new rl(o)),o=void 0,","===n)){s=":";continue}if("}"===n){if(a===t.items.length-1)continue}else if(n===s){s=":";continue}const l="Flow map contains an unexpected ".concat(n),f=new Ju.YAMLSyntaxError(t,l);f.offset=u,e.errors.push(f)}else c.type===Ju.Type.BLANK_LINE?n.push({afterKey:!!o,before:r.length}):c.type===Ju.Type.COMMENT?(_l(e.errors,c),n.push({afterKey:!!o,before:r.length,comment:c.comment})):void 0===o?(","===s&&e.errors.push(new Ju.YAMLSemanticError(c,"Separator , missing in flow map")),o=Nl(e,c)):(","!==s&&e.errors.push(new Ju.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new rl(o,Nl(e,c))),o=void 0,i=!1)}wl(e.errors,t),void 0!==o&&r.push(new rl(o));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];let o,i=null;for(let s=0;s<t.items.length;++s){const a=t.items[s];switch(a.type){case Ju.Type.BLANK_LINE:n.push({afterKey:!!o,before:r.length});break;case Ju.Type.COMMENT:n.push({afterKey:!!o,before:r.length,comment:a.comment});break;case Ju.Type.MAP_KEY:void 0!==o&&r.push(new rl(o)),a.error&&e.errors.push(a.error),o=Nl(e,a.node),i=null;break;case Ju.Type.MAP_VALUE:{if(void 0===o&&(o=null),a.error&&e.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===Ju.Type.MAP&&!a.node.context.atLineStart){const t="Nested mappings are not allowed in compact mappings";e.errors.push(new Ju.YAMLSemanticError(a.node,t))}let n=a.node;if(!n&&a.props.length>0){n=new Ju.PlainValue(Ju.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 s=new rl(o,Nl(e,n));Tl(a,s),r.push(s),o&&"number"==typeof i&&a.range.start>i+1024&&e.errors.push(El(t,o)),o=void 0,i=null}break;default:void 0!==o&&r.push(new rl(o)),o=Nl(e,a),i=a.range.start,a.error&&e.errors.push(a.error);e:for(let n=s+1;;++n){const r=t.items[n];switch(r&&r.type){case Ju.Type.BLANK_LINE:case Ju.Type.COMMENT:continue e;case Ju.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new Ju.YAMLSemanticError(a,t));break e}}}if(a.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new Ju.YAMLSemanticError(a,t))}}}void 0!==o&&r.push(new rl(o));return{comments:n,items:r}}(e,t),o=new al;o.items=r,bl(o,n);let i=!1;for(let n=0;n<r.length;++n){const{key:o}=r[n];if(o instanceof el&&(i=!0),e.schema.merge&&o&&"<<"===o.value){r[n]=new cl(r[n]);const o=r[n].value.items;let i=null;o.some((e=>{if(e instanceof il){const{type:t}=e.source;return t!==Ju.Type.MAP&&t!==Ju.Type.FLOW_MAP&&(i="Merge nodes aliases can only point to maps")}return i="Merge nodes can only have Alias nodes as values"})),i&&e.errors.push(new Ju.YAMLSemanticError(t,i))}else for(let i=n+1;i<r.length;++i){const{key:n}=r[i];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 Ju.YAMLSemanticError(t,n));break}}}if(i&&!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 Ju.YAMLWarning(t,n))}return t.resolved=o,o},qu.resolveNode=Nl,qu.resolveSeq=function(e,t){if(t.type!==Ju.Type.SEQ&&t.type!==Ju.Type.FLOW_SEQ){const n="A ".concat(t.type," node cannot be resolved as a sequence");return e.errors.push(new Ju.YAMLSyntaxError(t,n)),null}const{comments:n,items:r}=t.type===Ju.Type.FLOW_SEQ?function(e,t){const n=[],r=[];let o,i=!1,s=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||!i&&void 0===o||(i&&void 0===o&&(o=a?r.pop():null),r.push(new rl(o)),i=!1,o=void 0,s=null),n===a)a=null;else if(a||"?"!==n){if("["!==a&&":"===n&&void 0===o){if(","===a){if(o=r.pop(),o instanceof rl){const n="Chaining flow sequence pairs is invalid",r=new Ju.YAMLSemanticError(t,n);r.offset=f,e.errors.push(r)}if(!i&&"number"==typeof s){const n=l.range?l.range.start:l.offset;n>s+1024&&e.errors.push(El(t,o));const{src:r}=c.context;for(let t=s;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 Ju.YAMLSemanticError(c,t));break}}}else o=null;s=null,i=!1,a=null}else if("["===a||"]"!==n||u<t.items.length-1){const r="Flow sequence contains an unexpected ".concat(n),o=new Ju.YAMLSyntaxError(t,r);o.offset=f,e.errors.push(o)}}else i=!0}else if(l.type===Ju.Type.BLANK_LINE)n.push({before:r.length});else if(l.type===Ju.Type.COMMENT)_l(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 Ju.YAMLSemanticError(l,t))}const t=Nl(e,l);void 0===o?(r.push(t),c=l):(r.push(new rl(o,t)),o=void 0),s=l.range.start,a=","}}wl(e.errors,t),void 0!==o&&r.push(new rl(o));return{comments:n,items:r}}(e,t):function(e,t){const n=[],r=[];for(let o=0;o<t.items.length;++o){const i=t.items[o];switch(i.type){case Ju.Type.BLANK_LINE:n.push({before:r.length});break;case Ju.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case Ju.Type.SEQ_ITEM:if(i.error&&e.errors.push(i.error),r.push(Nl(e,i.node)),i.hasProps){const t="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new Ju.YAMLSemanticError(i,t))}break;default:i.error&&e.errors.push(i.error),e.errors.push(new Ju.YAMLSyntaxError(i,"Unexpected ".concat(i.type," node in sequence")))}}return{comments:n,items:r}}(e,t),o=new nl;if(o.items=r,bl(o,n),!e.options.mapAsMap&&r.some((e=>e instanceof rl&&e.key instanceof el))){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 Ju.YAMLWarning(t,n))}return t.resolved=o,o},qu.resolveString=Sl,qu.strOptions=ll,qu.stringifyNumber=function(e){let{format:t,minFractionDigits:n,tag:r,value:o}=e;if("bigint"==typeof o)return String(o);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let i=JSON.stringify(o);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let t=n-(i.length-e-1);for(;t-- >0;)i+="0"}return i},qu.stringifyString=function(e,t,n,r){const{defaultType:o}=ll,{implicitKey:i,inFlow:s}=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 Ju.Type.BLOCK_FOLDED:case Ju.Type.BLOCK_LITERAL:return vl(e,t,n,r);case Ju.Type.QUOTE_DOUBLE:return ml(c,t);case Ju.Type.QUOTE_SINGLE:return yl(c,t);case Ju.Type.PLAIN:return function(e,t,n,r){const{comment:o,type:i,value:s}=e,{actualString:a,implicitKey:c,indent:u,inFlow:l}=t;if(c&&/[\n[\]{},]/.test(s)||l&&/[[\]{},]/.test(s))return ml(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return c||l||-1===s.indexOf("\n")?-1!==s.indexOf('"')&&-1===s.indexOf("'")?yl(s,t):ml(s,t):vl(e,t,n,r);if(!c&&!l&&i!==Ju.Type.PLAIN&&-1!==s.indexOf("\n"))return vl(e,t,n,r);if(""===u&&gl(s))return t.forceBlockIndent=!0,vl(e,t,n,r);const f=s.replace(/\n+/g,"$&\n".concat(u));if(a){const{tags:e}=t.doc.schema;if("string"!=typeof fl(f,e,e.scalarFallback).value)return ml(s,t)}const h=c?f:pl(f,u,"flow",dl(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!==Ju.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?a=Ju.Type.QUOTE_DOUBLE:!i&&!s||a!==Ju.Type.BLOCK_FOLDED&&a!==Ju.Type.BLOCK_LITERAL||(a=Ju.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},qu.toJSON=Hu;var Cl={},Pl=void 0!==Pl?Pl:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},xl=[],Rl=[],Il="undefined"!=typeof Uint8Array?Uint8Array:Array,kl=!1;function Bl(){kl=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)xl[t]=e[t],Rl[e.charCodeAt(t)]=t;Rl["-".charCodeAt(0)]=62,Rl["_".charCodeAt(0)]=63}function Yl(e,t,n){for(var r,o,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(xl[(o=r)>>18&63]+xl[o>>12&63]+xl[o>>6&63]+xl[63&o]);return i.join("")}function Dl(e){var t;kl||Bl();for(var n=e.length,r=n%3,o="",i=[],s=16383,a=0,c=n-r;a<c;a+=s)i.push(Yl(e,a,a+s>c?c:a+s));return 1===r?(t=e[n-1],o+=xl[t>>2],o+=xl[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=xl[t>>10],o+=xl[t>>4&63],o+=xl[t<<2&63],o+="="),i.push(o),i.join("")}function Fl(e,t,n,r,o){var i,s,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,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)}function Ul(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-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,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+p]=255&s,p+=d,s/=256,u-=8);e[n+p-d]|=128*g}var jl={}.toString,Wl=Array.isArray||function(e){return"[object Array]"==jl.call(e)};function Kl(){return Ql.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Vl(e,t){if(Kl()<t)throw new RangeError("Invalid typed array length");return Ql.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Ql.prototype:(null===e&&(e=new Ql(t)),e.length=t),e}function Ql(e,t,n){if(!(Ql.TYPED_ARRAY_SUPPORT||this instanceof Ql))return new Ql(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 $l(this,e)}return ql(this,e,t,n)}function ql(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);Ql.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Ql.prototype:e=Gl(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!Ql.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Zl(t,n),o=(e=Vl(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(zl(t)){var n=0|Hl(t.length);return 0===(e=Vl(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?Vl(e,0):Gl(e,t);if("Buffer"===t.type&&Wl(t.data))return Gl(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Jl(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 $l(e,t){if(Jl(t),e=Vl(e,t<0?0:0|Hl(t)),!Ql.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function Gl(e,t){var n=t.length<0?0:0|Hl(t.length);e=Vl(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function Hl(e){if(e>=Kl())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Kl().toString(16)+" bytes");return 0|e}function zl(e){return!(null==e||!e._isBuffer)}function Zl(e,t){if(zl(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 Mf(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Of(e).length;default:if(r)return Mf(e).length;t=(""+t).toLowerCase(),r=!0}}function Xl(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 df(this,t,n);case"utf8":case"utf-8":return ff(this,t,n);case"ascii":return hf(this,t,n);case"latin1":case"binary":return pf(this,t,n);case"base64":return lf(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gf(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function ef(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function tf(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=Ql.from(t,r)),zl(t))return 0===t.length?-1:nf(e,t,n,r,o);if("number"==typeof t)return t&=255,Ql.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):nf(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function nf(e,t,n,r,o){var i,s=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;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var f=!0,h=0;h<c;h++)if(u(e,i+h)!==u(t,h)){f=!1;break}if(f)return i}return-1}function rf(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function of(e,t,n,r){return Lf(Mf(t,e.length-n),e,n,r)}function sf(e,t,n,r){return Lf(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function af(e,t,n,r){return sf(e,t,n,r)}function cf(e,t,n,r){return Lf(Of(t),e,n,r)}function uf(e,t,n,r){return Lf(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function lf(e,t,n){return 0===t&&n===e.length?Dl(e):Dl(e.slice(t,n))}function ff(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,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&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<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)}Ql.TYPED_ARRAY_SUPPORT=void 0===Pl.TYPED_ARRAY_SUPPORT||Pl.TYPED_ARRAY_SUPPORT,Ql.poolSize=8192,Ql._augment=function(e){return e.__proto__=Ql.prototype,e},Ql.from=function(e,t,n){return ql(null,e,t,n)},Ql.TYPED_ARRAY_SUPPORT&&(Ql.prototype.__proto__=Uint8Array.prototype,Ql.__proto__=Uint8Array),Ql.alloc=function(e,t,n){return function(e,t,n,r){return Jl(t),t<=0?Vl(e,t):void 0!==n?"string"==typeof r?Vl(e,t).fill(n,r):Vl(e,t).fill(n):Vl(e,t)}(null,e,t,n)},Ql.allocUnsafe=function(e){return $l(null,e)},Ql.allocUnsafeSlow=function(e){return $l(null,e)},Ql.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Nf(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Nf(e.slice(0,0))}(e))},Ql.compare=function(e,t){if(!zl(e)||!zl(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},Ql.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}},Ql.concat=function(e,t){if(!Wl(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Ql.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=Ql.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!zl(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},Ql.byteLength=Zl,Ql.prototype._isBuffer=!0,Ql.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)ef(this,t,t+1);return this},Ql.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)ef(this,t,t+3),ef(this,t+1,t+2);return this},Ql.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)ef(this,t,t+7),ef(this,t+1,t+6),ef(this,t+2,t+5),ef(this,t+3,t+4);return this},Ql.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?ff(this,0,e):Xl.apply(this,arguments)},Ql.prototype.equals=function(e){if(!zl(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ql.compare(this,e)},Ql.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+">"},Ql.prototype.compare=function(e,t,n,r,o){if(!zl(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 i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(r,o),u=e.slice(t,n),l=0;l<a;++l)if(c[l]!==u[l]){i=c[l],s=u[l];break}return i<s?-1:s<i?1:0},Ql.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},Ql.prototype.indexOf=function(e,t,n){return tf(this,e,t,n,!0)},Ql.prototype.lastIndexOf=function(e,t,n){return tf(this,e,t,n,!1)},Ql.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 i=!1;;)switch(r){case"hex":return rf(this,e,t,n);case"utf8":case"utf-8":return of(this,e,t,n);case"ascii":return sf(this,e,t,n);case"latin1":case"binary":return af(this,e,t,n);case"base64":return cf(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return uf(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},Ql.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function hf(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 pf(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 df(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=Af(e[i]);return o}function gf(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function mf(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 yf(e,t,n,r,o,i){if(!zl(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function vf(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function wf(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function _f(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Ef(e,t,n,r,o){return o||_f(e,0,n,4),Ul(e,t,n,r,23,4),n+4}function bf(e,t,n,r,o){return o||_f(e,0,n,8),Ul(e,t,n,r,52,8),n+8}Ql.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),Ql.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Ql.prototype;else{var o=t-e;n=new Ql(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},Ql.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||mf(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},Ql.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||mf(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},Ql.prototype.readUInt8=function(e,t){return t||mf(e,1,this.length),this[e]},Ql.prototype.readUInt16LE=function(e,t){return t||mf(e,2,this.length),this[e]|this[e+1]<<8},Ql.prototype.readUInt16BE=function(e,t){return t||mf(e,2,this.length),this[e]<<8|this[e+1]},Ql.prototype.readUInt32LE=function(e,t){return t||mf(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Ql.prototype.readUInt32BE=function(e,t){return t||mf(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Ql.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||mf(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},Ql.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||mf(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Ql.prototype.readInt8=function(e,t){return t||mf(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Ql.prototype.readInt16LE=function(e,t){t||mf(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Ql.prototype.readInt16BE=function(e,t){t||mf(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Ql.prototype.readInt32LE=function(e,t){return t||mf(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Ql.prototype.readInt32BE=function(e,t){return t||mf(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Ql.prototype.readFloatLE=function(e,t){return t||mf(e,4,this.length),Fl(this,e,!0,23,4)},Ql.prototype.readFloatBE=function(e,t){return t||mf(e,4,this.length),Fl(this,e,!1,23,4)},Ql.prototype.readDoubleLE=function(e,t){return t||mf(e,8,this.length),Fl(this,e,!0,52,8)},Ql.prototype.readDoubleBE=function(e,t){return t||mf(e,8,this.length),Fl(this,e,!1,52,8)},Ql.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||yf(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},Ql.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||yf(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},Ql.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,1,255,0),Ql.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Ql.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,2,65535,0),Ql.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):vf(this,e,t,!0),t+2},Ql.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,2,65535,0),Ql.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):vf(this,e,t,!1),t+2},Ql.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,4,4294967295,0),Ql.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):wf(this,e,t,!0),t+4},Ql.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,4,4294967295,0),Ql.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):wf(this,e,t,!1),t+4},Ql.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);yf(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},Ql.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);yf(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},Ql.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,1,127,-128),Ql.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ql.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,2,32767,-32768),Ql.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):vf(this,e,t,!0),t+2},Ql.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,2,32767,-32768),Ql.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):vf(this,e,t,!1),t+2},Ql.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,4,2147483647,-2147483648),Ql.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):wf(this,e,t,!0),t+4},Ql.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||yf(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ql.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):wf(this,e,t,!1),t+4},Ql.prototype.writeFloatLE=function(e,t,n){return Ef(this,e,t,!0,n)},Ql.prototype.writeFloatBE=function(e,t,n){return Ef(this,e,t,!1,n)},Ql.prototype.writeDoubleLE=function(e,t,n){return bf(this,e,t,!0,n)},Ql.prototype.writeDoubleBE=function(e,t,n){return bf(this,e,t,!1,n)},Ql.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,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!Ql.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},Ql.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&&!Ql.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 i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=zl(e)?e:Mf(new Ql(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var Sf=/[^+\/0-9A-Za-z-_]/g;function Af(e){return e<16?"0"+e.toString(16):e.toString(16)}function Mf(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Of(e){return function(e){var t,n,r,o,i,s;kl||Bl();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[a-2]?2:"="===e[a-1]?1:0,s=new Il(3*a/4-i),r=i>0?a-4:a;var c=0;for(t=0,n=0;t<r;t+=4,n+=3)o=Rl[e.charCodeAt(t)]<<18|Rl[e.charCodeAt(t+1)]<<12|Rl[e.charCodeAt(t+2)]<<6|Rl[e.charCodeAt(t+3)],s[c++]=o>>16&255,s[c++]=o>>8&255,s[c++]=255&o;return 2===i?(o=Rl[e.charCodeAt(t)]<<2|Rl[e.charCodeAt(t+1)]>>4,s[c++]=255&o):1===i&&(o=Rl[e.charCodeAt(t)]<<10|Rl[e.charCodeAt(t+1)]<<4|Rl[e.charCodeAt(t+2)]>>2,s[c++]=o>>8&255,s[c++]=255&o),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Sf,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Lf(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 Nf(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Tf(){throw new Error("setTimeout has not been defined")}function Cf(){throw new Error("clearTimeout has not been defined")}var Pf=Tf,xf=Cf;function Rf(e){if(Pf===setTimeout)return setTimeout(e,0);if((Pf===Tf||!Pf)&&setTimeout)return Pf=setTimeout,setTimeout(e,0);try{return Pf(e,0)}catch(t){try{return Pf.call(null,e,0)}catch(t){return Pf.call(this,e,0)}}}"function"==typeof Pl.setTimeout&&(Pf=setTimeout),"function"==typeof Pl.clearTimeout&&(xf=clearTimeout);var If,kf=[],Bf=!1,Yf=-1;function Df(){Bf&&If&&(Bf=!1,If.length?kf=If.concat(kf):Yf=-1,kf.length&&Ff())}function Ff(){if(!Bf){var e=Rf(Df);Bf=!0;for(var t=kf.length;t;){for(If=kf,kf=[];++Yf<t;)If&&If[Yf].run();Yf=-1,t=kf.length}If=null,Bf=!1,function(e){if(xf===clearTimeout)return clearTimeout(e);if((xf===Cf||!xf)&&clearTimeout)return xf=clearTimeout,clearTimeout(e);try{xf(e)}catch(t){try{return xf.call(null,e)}catch(t){return xf.call(this,e)}}}(e)}}function Uf(e,t){this.fun=e,this.array=t}Uf.prototype.run=function(){this.fun.apply(null,this.array)};function jf(){}var Wf=jf,Kf=jf,Vf=jf,Qf=jf,qf=jf,Jf=jf,$f=jf;var Gf=Pl.performance||{},Hf=Gf.now||Gf.mozNow||Gf.msNow||Gf.oNow||Gf.webkitNow||function(){return(new Date).getTime()};var zf=new Date;var Zf={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];kf.push(new Uf(e,t)),1!==kf.length||Bf||Rf(Ff)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Wf,addListener:Kf,once:Vf,off:Qf,removeListener:qf,removeAllListeners:Jf,emit:$f,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*Hf.call(Gf),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-zf)/1e3}},Xf={},eh=mu,th=qu;const nh={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const n=th.resolveString(e,t);return Ql.from(n,"base64")},options:th.binaryOptions,stringify:(e,t,n,r)=>{let o,{comment:i,type:s,value:a}=e;if(o=a instanceof Ql?a.toString("base64"):Ql.from(a.buffer).toString("base64"),s||(s=th.binaryOptions.defaultType),s===eh.Type.QUOTE_DOUBLE)a=o;else{const{lineWidth:e}=th.binaryOptions,t=Math.ceil(o.length/e),n=new Array(t);for(let r=0,i=0;r<t;++r,i+=e)n[r]=o.substr(i,e);a=n.join(s===eh.Type.BLOCK_LITERAL?"\n":" ")}return th.stringifyString({comment:i,type:s,value:a},t,n,r)}};function rh(e,t){const n=th.resolveSeq(e,t);for(let e=0;e<n.items.length;++e){let r=n.items[e];if(!(r instanceof th.Pair)){if(r instanceof th.YAMLMap){if(r.items.length>1){const e="Each pair must have its own sequence indicator";throw new eh.YAMLSemanticError(t,e)}const e=r.items[0]||new th.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 th.Pair?r:new th.Pair(r)}}return n}function oh(e,t,n){const r=new th.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";for(const o of t){let t,i;if(Array.isArray(o)){if(2!==o.length)throw new TypeError("Expected [key, value] tuple: ".concat(o));t=o[0],i=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],i=o[t]}else t=o;const s=e.createPair(t,i,n);r.items.push(s)}return r}const ih={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:rh,createNode:oh};class sh extends th.YAMLSeq{constructor(){super(),eh._defineProperty(this,"add",th.YAMLMap.prototype.add.bind(this)),eh._defineProperty(this,"delete",th.YAMLMap.prototype.delete.bind(this)),eh._defineProperty(this,"get",th.YAMLMap.prototype.get.bind(this)),eh._defineProperty(this,"has",th.YAMLMap.prototype.has.bind(this)),eh._defineProperty(this,"set",th.YAMLMap.prototype.set.bind(this)),this.tag=sh.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 th.Pair?(r=th.toJSON(e.key,"",t),o=th.toJSON(e.value,r,t)):r=th.toJSON(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}}eh._defineProperty(sh,"tag","tag:yaml.org,2002:omap");const ah={identify:e=>e instanceof Map,nodeClass:sh,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){const n=rh(e,t),r=[];for(const{key:e}of n.items)if(e instanceof th.Scalar){if(r.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new eh.YAMLSemanticError(t,e)}r.push(e.value)}return Object.assign(new sh,n)},createNode:function(e,t,n){const r=oh(e,t,n),o=new sh;return o.items=r.items,o}};class ch extends th.YAMLMap{constructor(){super(),this.tag=ch.tag}add(e){const t=e instanceof th.Pair?e:new th.Pair(e);th.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=th.findPair(this.items,e);return!t&&n instanceof th.Pair?n.key instanceof th.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=th.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new th.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")}}eh._defineProperty(ch,"tag","tag:yaml.org,2002:set");const uh={identify:e=>e instanceof Set,nodeClass:ch,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){const n=th.resolveMap(e,t);if(!n.hasAllNullValues())throw new eh.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new ch,n)},createNode:function(e,t,n){const r=new ch;for(const o of t)r.items.push(e.createPair(o,null,n));return r}},lh=(e,t)=>{const n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},fh=e=>{let{value:t}=e;if(isNaN(t)||!isFinite(t))return th.stringifyNumber(t);let n="";t<0&&(n="-",t=Math.abs(t));const r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},hh={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)=>lh(t,n.replace(/_/g,"")),stringify:fh},ph={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)=>lh(t,n.replace(/_/g,"")),stringify:fh},dh={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,i,s,a,c)=>{a&&(a=(a+"00").substr(1,3));let u=Date.UTC(t,n-1,r,o||0,i||0,s||0,a||0);if(c&&"Z"!==c){let e=lh(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:e=>{let{value:t}=e;return t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function gh(e){const t=void 0!==Zf&&Zf.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 mh(e,t){if(gh(!1)){const n=void 0!==Zf&&Zf.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}const yh={};Xf.binary=nh,Xf.floatTime=ph,Xf.intTime=hh,Xf.omap=ah,Xf.pairs=ih,Xf.set=uh,Xf.timestamp=dh,Xf.warn=mh,Xf.warnFileDeprecation=function(e){if(gh(!0)){const t=e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");mh("The endpoint 'yaml/".concat(t,"' will be removed in a future release."),"DeprecationWarning")}},Xf.warnOptionDeprecation=function(e,t){if(!yh[e]&&gh(!0)){yh[e]=!0;let n="The option '".concat(e,"' will be removed in a future release");n+=t?", use '".concat(t,"' instead."):".",mh(n,"DeprecationWarning")}};var vh=mu,wh=qu,_h=Xf;const Eh={createNode:function(e,t,n){const r=new wh.YAMLMap(e);if(t instanceof Map)for(const[o,i]of t)r.items.push(e.createPair(o,i,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:wh.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:wh.resolveMap};const bh={createNode:function(e,t,n){const r=new wh.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:wh.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:wh.resolveSeq},Sh={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:wh.resolveString,stringify:(e,t,n,r)=>(t=Object.assign({actualString:!0},t),wh.stringifyString(e,t,n,r)),options:wh.strOptions},Ah=[Eh,bh,Sh],Mh=e=>"bigint"==typeof e||Number.isInteger(e),Oh=(e,t,n)=>wh.intOptions.asBigInt?BigInt(e):parseInt(t,n);function Lh(e,t,n){const{value:r}=e;return Mh(r)&&r>=0?n+r.toString(t):wh.stringifyNumber(e)}const Nh={identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new wh.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:wh.nullOptions,stringify:()=>wh.nullOptions.nullStr},Th={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:wh.boolOptions,stringify:e=>{let{value:t}=e;return t?wh.boolOptions.trueStr:wh.boolOptions.falseStr}},Ch={identify:e=>Mh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>Oh(e,t,8),options:wh.intOptions,stringify:e=>Lh(e,8,"0o")},Ph={identify:Mh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>Oh(e,e,10),options:wh.intOptions,stringify:wh.stringifyNumber},xh={identify:e=>Mh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>Oh(e,t,16),options:wh.intOptions,stringify:e=>Lh(e,16,"0x")},Rh={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:wh.stringifyNumber},Ih={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:e=>{let{value:t}=e;return Number(t).toExponential()}},kh={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 wh.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(o.minFractionDigits=r.length),o},stringify:wh.stringifyNumber},Bh=Ah.concat([Nh,Th,Ch,Ph,xh,Rh,Ih,kh]),Yh=e=>"bigint"==typeof e||Number.isInteger(e),Dh=e=>{let{value:t}=e;return JSON.stringify(t)},Fh=[Eh,bh,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:wh.resolveString,stringify:Dh},{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new wh.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Dh},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:Dh},{identify:Yh,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>wh.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:e=>{let{value:t}=e;return Yh(t)?t.toString():JSON.stringify(t)}},{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:Dh}];Fh.scalarFallback=e=>{throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};const Uh=e=>{let{value:t}=e;return t?wh.boolOptions.trueStr:wh.boolOptions.falseStr},jh=e=>"bigint"==typeof e||Number.isInteger(e);function Wh(e,t,n){let r=t.replace(/_/g,"");if(wh.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 Kh(e,t,n){const{value:r}=e;if(jh(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return wh.stringifyNumber(e)}const Vh=Ah.concat([{identify:e=>null==e,createNode:(e,t,n)=>n.wrapScalars?new wh.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:wh.nullOptions,stringify:()=>wh.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:wh.boolOptions,stringify:Uh},{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:wh.boolOptions,stringify:Uh},{identify:jh,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>Wh(t,n,2),stringify:e=>Kh(e,2,"0b")},{identify:jh,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>Wh(t,n,8),stringify:e=>Kh(e,8,"0")},{identify:jh,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>Wh(t,n,10),stringify:wh.stringifyNumber},{identify:jh,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>Wh(t,n,16),stringify:e=>Kh(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:wh.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:e=>{let{value:t}=e;return Number(t).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 wh.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:wh.stringifyNumber}],_h.binary,_h.omap,_h.pairs,_h.set,_h.intTime,_h.floatTime,_h.timestamp),Qh={core:Bh,failsafe:Ah,json:Fh,yaml11:Vh},qh={binary:_h.binary,bool:Th,float:kh,floatExp:Ih,floatNaN:Rh,floatTime:_h.floatTime,int:Ph,intHex:xh,intOct:Ch,intTime:_h.intTime,map:Eh,null:Nh,omap:_h.omap,pairs:_h.pairs,seq:bh,set:_h.set,timestamp:_h.timestamp};function Jh(e,t,n){if(e instanceof wh.Node)return e;const{defaultPrefix:r,onTagObj:o,prevObjects:i,schema:s,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,s.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return a?new wh.Scalar(e):e;c=e instanceof Map?Eh:e[Symbol.iterator]?bh:Eh}o&&(o(c),delete n.onTagObj);const u={value:void 0,node:void 0};if(e&&"object"==typeof e&&i){const t=i.get(e);if(t){const e=new wh.Alias(t);return n.aliasNodes.push(e),e}u.value=e,i.set(e,u)}return u.node=c.createNode?c.createNode(n.schema,e,n):a?new wh.Scalar(e):e,t&&u.node instanceof wh.Node&&(u.node.tag=t),u.node}const $h=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Gh{constructor(e){let{customTags:t,merge:n,schema:r,sortMapEntries:o,tags:i}=e;this.merge=!!n,this.name=r,this.sortMapEntries=!0===o?$h:o||null,!t&&i&&_h.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}(Qh,qh,t||i,r)}createNode(e,t,n,r){const o={defaultPrefix:Gh.defaultPrefix,schema:this,wrapScalars:t};return Jh(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 wh.Pair(r,o)}}vh._defineProperty(Gh,"defaultPrefix",vh.defaultTagPrefix),vh._defineProperty(Gh,"defaultTags",vh.defaultTags),Cl.Schema=Gh;var Hh=mu,zh=qu,Zh=Cl;const Xh={get binary(){return zh.binaryOptions},set binary(e){Object.assign(zh.binaryOptions,e)},get bool(){return zh.boolOptions},set bool(e){Object.assign(zh.boolOptions,e)},get int(){return zh.intOptions},set int(e){Object.assign(zh.intOptions,e)},get null(){return zh.nullOptions},set null(e){Object.assign(zh.nullOptions,e)},get str(){return zh.strOptions},set str(e){Object.assign(zh.strOptions,e)}},ep={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Hh.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Hh.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Hh.defaultTagPrefix}]}};function tp(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 np(e,t,n,r){const{anchors:o,schema:i}=t.doc;let s;if(!(e instanceof zh.Node)){const t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=i.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 zh.Pair)return e.toString(t,n,r);s||(s=function(e,t){if(t instanceof zh.Alias)return zh.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 zh.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}(i.tags,e));const a=function(e,t,n){let{anchors:r,doc:o}=n;const i=[],s=o.anchors.getName(e);return s&&(r[s]=e,i.push("&".concat(s))),e.tag?i.push(tp(o,e.tag)):t.default||i.push(tp(o,t.tag)),i.join(" ")}(e,s,t);a.length>0&&(t.indentAtStart=(t.indentAtStart||0)+a.length+1);const c="function"==typeof s.stringify?s.stringify(e,t,n,r):e instanceof zh.Scalar?zh.stringifyString(e,t,n,r):e.toString(t,n,r);return a?e instanceof zh.Scalar||"{"===c[0]||"["===c[0]?"".concat(a," ").concat(c):"".concat(a,"\n").concat(t.indent).concat(c):c}class rp{static validAnchorNode(e){return e instanceof zh.Scalar||e instanceof zh.YAMLSeq||e instanceof zh.YAMLMap}constructor(e){Hh._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new zh.Alias(e)}createMergePair(){const e=new zh.Merge;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.value.items=n.map((e=>{if(e instanceof zh.Alias){if(e.source instanceof zh.YAMLMap)return e}else if(e instanceof zh.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),e}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&&!rp.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 op=(e,t)=>{if(e&&"object"==typeof e){const{tag:n}=e;e instanceof zh.Collection?(n&&(t[n]=!0),e.items.forEach((e=>op(e,t)))):e instanceof zh.Pair?(op(e.key,t),op(e.value,t)):e instanceof zh.Scalar&&n&&(t[n]=!0)}return t};function ip(e,t){let{tagPrefixes:n}=e;const[r,o]=t.parameters;if(!r||!o){const e="Insufficient parameters given for %TAG directive";throw new Hh.YAMLSemanticError(t,e)}if(n.some((e=>e.handle===r))){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new Hh.YAMLSemanticError(t,e)}return{handle:r,prefix:o}}function sp(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 Hh.YAMLSemanticError(t,e)}if(!ep[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 Hh.YAMLWarning(t,o))}return n}function ap(e){if(e instanceof zh.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}class cp{constructor(e){this.anchors=new rp(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 ap(this.contents),this.contents.add(e)}addIn(e,t){ap(this.contents),this.contents.addIn(e,t)}delete(e){return ap(this.contents),this.contents.delete(e)}deleteIn(e){return zh.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(ap(this.contents),this.contents.deleteIn(e))}getDefaults(){return cp.defaults[this.version]||cp.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof zh.Collection?this.contents.get(e,t):void 0}getIn(e,t){return zh.isEmptyPath(e)?!t&&this.contents instanceof zh.Scalar?this.contents.value:this.contents:this.contents instanceof zh.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof zh.Collection&&this.contents.has(e)}hasIn(e){return zh.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof zh.Collection&&this.contents.hasIn(e)}set(e,t){ap(this.contents),this.contents.set(e,t)}setIn(e,t){zh.isEmptyPath(e)?this.contents=t:(ap(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 Zh.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:i,valueRange:s}=e;if(i&&(i.source||(i.source=this),this.errors.push(i)),function(e,t,n){const r=[];let o=!1;for(const n of t){const{comment:t,name:i}=n;switch(i){case"TAG":try{e.tagPrefixes.push(ip(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 Hh.YAMLSemanticError(n,t))}try{e.version=sp(e,n)}catch(t){e.errors.push(t)}o=!0;break;default:if(i){const t="YAML only supports %TAG and %YAML directives, and not %".concat(i);e.warnings.push(new Hh.YAMLWarning(n,t))}}t&&r.push(t)}if(n&&!o&&"1.1"===(e.version||n.version||e.options.version)){const t=e=>{let{handle:t,prefix:n}=e;return{handle:t,prefix:n}};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=s?[s.start,s.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){const n={before:[],after:[]};let r,o=!1;for(const i of t)if(i.valueRange){if(void 0!==r){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new Hh.YAMLSyntaxError(i,t));break}const t=zh.resolveNode(e,i);o&&(t.spaceBefore=!0,o=!1),r=t}else null!==i.comment?(void 0===r?n.before:n.after).push(i.comment):i.type===Hh.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 zh.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 Hh.YAMLError&&e.makePretty();for(const e of this.warnings)e instanceof Hh.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=>Object.keys(op(e,{})))(this.contents).filter((e=>0!==e.indexOf(Zh.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,i=n&&("string"!=typeof e||!(this.contents instanceof zh.Scalar)),s={doc:this,indentStep:" ",keep:i,mapAsMap:i&&!!r,maxAliasCount:o,stringify:np},a=Object.keys(this.anchors.map);a.length>0&&(s.anchors=new Map(a.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));const c=zh.toJSON(this.contents,e,s);if("function"==typeof t&&s.anchors)for(const{count:e,res:n}of s.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((e=>{let{handle:o,prefix:i}=e;r.some((e=>0===e.indexOf(i)))&&(t.push("%TAG ".concat(o," ").concat(i)),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:np};let i=!1,s=null;if(this.contents){this.contents instanceof zh.Node&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment,s=this.contents.comment);const e=s?null:()=>i=!0,r=np(this.contents,o,(()=>s=null),e);t.push(zh.addComment(r,"",s))}else void 0!==this.contents&&t.push(np(this.contents,o));return this.comment&&(i&&!s||""===t[t.length-1]||t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}}Hh._defineProperty(cp,"defaults",ep),Qu.Document=cp,Qu.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"},Qu.scalarOptions=Xh;var up=gu,lp=Qu,fp=Cl,hp=mu,pp=Xf;class dp extends lp.Document{constructor(e){super(Object.assign({},lp.defaultOptions,e))}}function gp(e,t){const n=up.parse(e),r=new dp(t).parse(n[0]);if(n.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new hp.YAMLSemanticError(n[1],e))}return r}const mp={createNode:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);const r=Object.assign({},lp.Document.defaults[lp.defaultOptions.version],lp.defaultOptions),o=new fp.Schema(r);return o.createNode(e,t,n)},defaultOptions:lp.defaultOptions,Document:dp,parse:function(e,t){const n=gp(e,t);if(n.warnings.forEach((e=>pp.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 up.parse(e)){const e=new dp(t);e.parse(o,r),n.push(e),r=e}return n},parseCST:up.parse,parseDocument:gp,scalarOptions:lp.scalarOptions,stringify:function(e,t){const n=new dp(t);return n.contents=e,String(n)}};du.YAML=mp;var yp=du.YAML,vp={},wp={},_p=qu,Ep=mu;wp.findPair=_p.findPair,wp.parseMap=_p.resolveMap,wp.parseSeq=_p.resolveSeq,wp.stringifyNumber=_p.stringifyNumber,wp.stringifyString=_p.stringifyString,wp.toJSON=_p.toJSON,wp.Type=Ep.Type,wp.YAMLError=Ep.YAMLError,wp.YAMLReferenceError=Ep.YAMLReferenceError,wp.YAMLSemanticError=Ep.YAMLSemanticError,wp.YAMLSyntaxError=Ep.YAMLSyntaxError,wp.YAMLWarning=Ep.YAMLWarning;const bp=wp;vp.findPair=bp.findPair,vp.toJSON=bp.toJSON,vp.parseMap=bp.parseMap,vp.parseSeq=bp.parseSeq,vp.stringifyNumber=bp.stringifyNumber,vp.stringifyString=bp.stringifyString,vp.Type=bp.Type,vp.YAMLError=bp.YAMLError,vp.YAMLReferenceError=bp.YAMLReferenceError,vp.YAMLSemanticError=bp.YAMLSemanticError,vp.YAMLSyntaxError=bp.YAMLSyntaxError,vp.YAMLWarning=bp.YAMLWarning,pu.__esModule=!0;var Sp=yp;pu.Document=Sp.Document;var Ap=yp;pu.parseCST=Ap.parseCST;var Mp=vp;pu.YAMLError=Mp.YAMLError,pu.YAMLSyntaxError=Mp.YAMLSyntaxError,pu.YAMLSemanticError=Mp.YAMLSemanticError,d.__esModule=!0;var Op=g,Lp=Co,Np=Do,Tp=Wo,Cp=Ko,Pp=li,xp=qc,Rp=Gc,Ip=Zc,kp=eu,Bp=nu,Yp=ru,Dp=pu;d.parse=function(e){var t=Dp.parseCST(e);kp.addOrigRange(t);for(var n=t.map((function(e){return new Dp.Document({merge:!1,keepCstNodes:!0}).parse(e)})),r=[],o={text:e,locator:new Op.default(e),comments:r,transformOffset:function(e){return Rp.transformOffset(e,o)},transformRange:function(e){return Ip.transformRange(e,o)},transformNode:function(e){return Cp.transformNode(e,o)},transformContent:function(e){return Pp.transformContent(e,o)}},i=0,s=n;i<s.length;i++)for(var a=0,c=s[i].errors;a<c.length;a++){var u=c[a];if(!(u instanceof Dp.YAMLSemanticError&&'Map keys must be unique; "<<" is repeated'===u.message))throw xp.transformError(u,o)}n.forEach((function(e){return Tp.removeCstBlankLine(e.cstNode)}));var l=Np.createRoot(o.transformRange({origStart:0,origEnd:o.text.length}),n.map(o.transformNode),r);return Lp.attachComments(l),Yp.updatePositions(l),Bp.removeFakeNodes(l),l},function(e){e.__esModule=!0,p.__exportStar(d,e)}(o);const Fp=t,{hasPragma:Up}=n,{locStart:jp,locEnd:Wp}=r;const Kp={astFormat:"yaml",parse:function(e){const{parse:t}=o;try{const n=t(e);return delete n.comments,n}catch(e){if(e&&e.position)throw Fp(e.message,e.position);throw e}},hasPragma:Up,locStart:jp,locEnd:Wp};var Vp={parsers:{yaml:Kp}};export{Vp as default};
|
|
|