diff --git a/asset-manifest.json b/asset-manifest.json index a1971935ee..d3830e2462 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/apidom/static/css/main.e6c13ad2.css", - "main.js": "/apidom/static/js/main.7f737699.js", - "static/js/41.17dd409f.chunk.js": "/apidom/static/js/41.17dd409f.chunk.js", + "main.js": "/apidom/static/js/main.3f4d5188.js", + "static/js/41.3d1985b4.chunk.js": "/apidom/static/js/41.3d1985b4.chunk.js", "static/js/600.793c8b77.chunk.js": "/apidom/static/js/600.793c8b77.chunk.js", "static/js/834.2f872061.chunk.js": "/apidom/static/js/834.2f872061.chunk.js", "static/media/tree-sitter-yaml.wasm": "/apidom/static/media/tree-sitter-yaml.d396281e11774e0afa7a.wasm", @@ -10,13 +10,13 @@ "static/media/tree-sitter-json.wasm": "/apidom/static/media/tree-sitter-json.13ee407b2f9bd26c9437.wasm", "index.html": "/apidom/index.html", "main.e6c13ad2.css.map": "/apidom/static/css/main.e6c13ad2.css.map", - "main.7f737699.js.map": "/apidom/static/js/main.7f737699.js.map", - "41.17dd409f.chunk.js.map": "/apidom/static/js/41.17dd409f.chunk.js.map", + "main.3f4d5188.js.map": "/apidom/static/js/main.3f4d5188.js.map", + "41.3d1985b4.chunk.js.map": "/apidom/static/js/41.3d1985b4.chunk.js.map", "600.793c8b77.chunk.js.map": "/apidom/static/js/600.793c8b77.chunk.js.map", "834.2f872061.chunk.js.map": "/apidom/static/js/834.2f872061.chunk.js.map" }, "entrypoints": [ "static/css/main.e6c13ad2.css", - "static/js/main.7f737699.js" + "static/js/main.3f4d5188.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index bc46b6f1d4..6802a9ef19 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -ApiDOM playground
\ No newline at end of file +ApiDOM playground
\ No newline at end of file diff --git a/static/js/41.17dd409f.chunk.js b/static/js/41.17dd409f.chunk.js deleted file mode 100644 index 76caea6ff4..0000000000 --- a/static/js/41.17dd409f.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var e={95205:(e,t,s)=>{"use strict";var i={};s.r(i),s.d(i,{hasElementSourceMap:()=>Re,includesClasses:()=>Te,includesSymbols:()=>qe,isAnnotationElement:()=>Oe,isArrayElement:()=>we,isBooleanElement:()=>Ee,isCommentElement:()=>$e,isElement:()=>fe,isLinkElement:()=>je,isMemberElement:()=>Se,isNullElement:()=>ye,isNumberElement:()=>be,isObjectElement:()=>xe,isParseResultElement:()=>Be,isPrimitiveElement:()=>Ze,isRefElement:()=>Pe,isSourceMapElement:()=>Me,isStringElement:()=>ve});var n={};s.r(n),s.d(n,{detect:()=>Ds,detectionRegExp:()=>Is,lexicalAnalysis:()=>bt,mediaTypes:()=>Ns,namespace:()=>Cs,parse:()=>Vs,syntacticAnalysis:()=>Ft,syntacticAnalysisDirect:()=>Ft,syntacticAnalysisIndirect:()=>Fs});var r={};s.r(r),s.d(r,{detect:()=>Fn,lexicalAnalysis:()=>_s,mediaTypes:()=>An,namespace:()=>kn,parse:()=>Cn,syntacticAnalysis:()=>Tn});var o={};s.r(o),s.d(o,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>So,isLinkDescriptionElement:()=>Oo,isMediaElement:()=>Po});var c={};s.r(c),s.d(c,{isReferenceLikeElement:()=>vc,isSwaggerExtension:()=>fc});var a={};s.r(a),s.d(a,{isContactElement:()=>Gc,isDefinitionsElement:()=>ma,isExampleElement:()=>ia,isExternalDocumentationElement:()=>Xc,isHeaderElement:()=>na,isHeadersElement:()=>sa,isInfoElement:()=>Hc,isItemsElement:()=>Qc,isLicenseElement:()=>_c,isOperationElement:()=>zc,isParameterElement:()=>Yc,isParametersDefinitionsElement:()=>ha,isPathItemElement:()=>Wc,isPathsElement:()=>Kc,isReferenceElement:()=>oa,isResponseElement:()=>ta,isResponsesDefinitionsElement:()=>la,isResponsesElement:()=>ea,isSchemaElement:()=>ca,isScopesElement:()=>ua,isSecurityDefinitionsElement:()=>pa,isSecurityRequirementElement:()=>ga,isSecuritySchemeElement:()=>da,isSwaggerElement:()=>Jc,isSwaggerVersionElement:()=>Uc,isTagElement:()=>ra,isXmlElement:()=>aa});var l={};s.r(l),s.d(l,{detect:()=>kl,detectionRegExp:()=>Tl,mediaTypes:()=>ql,namespace:()=>Fl,parse:()=>Al});var p={};s.r(p),s.d(p,{detect:()=>Nl,detectionRegExp:()=>Il,mediaTypes:()=>Cl,namespace:()=>Vl,parse:()=>Dl});var m={};s.r(m),s.d(m,{isOpenApi3_0LikeElement:()=>em,isOpenApiExtension:()=>cm,isParameterLikeElement:()=>tm,isReferenceLikeElement:()=>sm,isRequestBodyLikeElement:()=>im,isResponseLikeElement:()=>nm,isServerLikeElement:()=>rm,isTagLikeElement:()=>om});var h={};s.r(h),s.d(h,{isBooleanJsonSchemaElement:()=>fh,isCallbackElement:()=>zm,isComponentsElement:()=>Xm,isContactElement:()=>Ym,isExampleElement:()=>Qm,isExternalDocumentationElement:()=>eh,isHeaderElement:()=>th,isInfoElement:()=>sh,isLicenseElement:()=>ih,isLinkElement:()=>nh,isMediaTypeElement:()=>Eh,isOpenApi3_0Element:()=>oh,isOpenapiElement:()=>rh,isOperationElement:()=>ch,isParameterElement:()=>ah,isPathItemElement:()=>lh,isPathsElement:()=>ph,isReferenceElement:()=>mh,isRequestBodyElement:()=>hh,isResponseElement:()=>dh,isResponsesElement:()=>uh,isSchemaElement:()=>gh,isSecurityRequirementElement:()=>vh,isServerElement:()=>bh,isServerVariableElement:()=>yh,isServersElement:()=>xh});var d={};s.r(d),s.d(d,{detect:()=>vf,detectionRegExp:()=>ff,mediaTypes:()=>gf,namespace:()=>yf,parse:()=>bf});var u={};s.r(u),s.d(u,{detect:()=>wf,detectionRegExp:()=>xf,mediaTypes:()=>Ef,namespace:()=>jf,parse:()=>Sf});var g={};s.r(g),s.d(g,{isBooleanJsonSchemaElement:()=>pb,isCallbackElement:()=>Vv,isComponentsElement:()=>Lv,isContactElement:()=>Jv,isExampleElement:()=>Uv,isExternalDocumentationElement:()=>Hv,isHeaderElement:()=>_v,isInfoElement:()=>Gv,isJsonSchemaDialectElement:()=>Kv,isLicenseElement:()=>Wv,isLinkElement:()=>zv,isMediaTypeElement:()=>ub,isOpenApi3_1Element:()=>Yv,isOpenapiElement:()=>Xv,isOperationElement:()=>Qv,isParameterElement:()=>eb,isPathItemElement:()=>tb,isPathItemElementExternal:()=>sb,isPathsElement:()=>ib,isReferenceElement:()=>nb,isReferenceElementExternal:()=>rb,isRequestBodyElement:()=>ob,isResponseElement:()=>cb,isResponsesElement:()=>ab,isSchemaElement:()=>lb,isSecurityRequirementElement:()=>mb,isServerElement:()=>hb,isServerVariableElement:()=>db});var f={};s.r(f),s.d(f,{detect:()=>nE,detectionRegExp:()=>iE,mediaTypes:()=>sE,namespace:()=>oE,parse:()=>rE});var v={};s.r(v),s.d(v,{detect:()=>lE,detectionRegExp:()=>aE,mediaTypes:()=>cE,namespace:()=>mE,parse:()=>pE});var b={};s.r(b),s.d(b,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>OE,isLinkDescriptionElement:()=>$E,isMediaElement:()=>Po});var y={};s.r(y),s.d(y,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>Ew,isLinkDescriptionElement:()=>xw});var E={};s.r(E),s.d(E,{isAsyncApi2Element:()=>Aw,isAsyncApiVersionElement:()=>Fw,isBooleanJsonSchemaElement:()=>zw,isChannelBindingsElement:()=>Cw,isChannelItemElement:()=>Iw,isChannelsElement:()=>Nw,isComponentsElement:()=>Dw,isContactElement:()=>Vw,isIdentifierElement:()=>Lw,isInfoElement:()=>Jw,isLicenseElement:()=>Uw,isOperationElement:()=>Hw,isParameterElement:()=>_w,isParametersElement:()=>Gw,isReferenceElement:()=>Kw,isSchemaElement:()=>Ww,isSecurityRequirementElement:()=>Xw,isServerBindingsElement:()=>Qw,isServerElement:()=>Yw,isServerVariableElement:()=>tS,isServersElement:()=>eS});var x={};s.r(x),s.d(x,{detect:()=>lR,detectionRegExp:()=>aR,mediaTypes:()=>cR,namespace:()=>mR,parse:()=>pR});var w={};s.r(w),s.d(w,{detect:()=>uR,detectionRegExp:()=>dR,mediaTypes:()=>hR,namespace:()=>fR,parse:()=>gR});var S={};s.r(S),s.d(S,{isReferenceLikeElement:()=>KR,isWorkflowsSpecificationExtension:()=>GR});var j={};s.r(j),s.d(j,{isComponentsElement:()=>Yq,isCriterionElement:()=>Qq,isFailureActionCriteriaElement:()=>iT,isFailureActionElement:()=>sT,isInfoElement:()=>Fq,isJSONSchemaElement:()=>nT,isParameterElement:()=>zq,isReferenceElement:()=>eT,isSourceDescriptionElement:()=>Cq,isSourceDescriptionsElement:()=>Iq,isStepDependsOnElement:()=>Kq,isStepElement:()=>_q,isStepOnFailureElement:()=>Uq,isStepOnSuccessElement:()=>Jq,isStepOutputsElement:()=>Hq,isStepParametersElement:()=>Gq,isStepSuccessCriteriaElement:()=>Wq,isSuccessActionCriteriaElement:()=>tT,isSuccessActionElement:()=>Xq,isWorkflowElement:()=>Lq,isWorkflowOutputsElement:()=>Vq,isWorkflowStepsElement:()=>Dq,isWorkflowsElement:()=>Nq,isWorkflowsSpecElement:()=>kq,isWorkflowsSpecification1Element:()=>Aq});var P={};s.r(P),s.d(P,{detect:()=>VT,detectionRegExp:()=>DT,mediaTypes:()=>NT,namespace:()=>JT,parse:()=>LT});var O={};s.r(O),s.d(O,{detect:()=>_T,detectionRegExp:()=>HT,mediaTypes:()=>UT,namespace:()=>KT,parse:()=>GT});var $={};s.r($),s.d($,{isInfoElement:()=>HF,isMainElement:()=>UF,isPrincipleElement:()=>_F,isRequirementElement:()=>GF,isRequirementLevelElement:()=>KF,isScenarioElement:()=>WF,isStandardElement:()=>zF,isStandardIdentifierElement:()=>XF});var B=s(12578),M=s(2285),Z=s(7638);class R extends M.RP{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}const q=R;class T extends M.RP{constructor(e,t,s){super(e,t,s),this.element="comment"}}const k=T;var A=s(14985);class F extends M.ON{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.children.filter((e=>e.classes.contains("api"))).first}get results(){return this.children.filter((e=>e.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((e=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if((0,A.Z)(t))return!1;const s=this.content.findIndex((e=>e===t));return-1!==s&&(this.content[s]=e,!0)}}const C=F;class I extends M.ON{constructor(e,t,s){super(e,t,s),this.element="sourceMap"}get positionStart(){return this.children.filter((e=>e.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((e=>e.classes.contains("position"))).get(1)}set position(e){if("undefined"===typeof e)return;const t=new M.ON([e.start.row,e.start.column,e.start.char]),s=new M.ON([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),s.classes.push("position"),this.push(t).push(s)}}const N=I;class D extends M.lS{constructor(){super(),this.register("annotation",q),this.register("comment",k),this.register("parseResult",C),this.register("sourceMap",N)}}const V=new D,L=e=>{const t=new D;return(0,Z.Z)(e)&&t.use(e),t},J=V,U=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:J).toRefract(e)};var H=s(37591),_=s(19475);const G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J;if((0,_.Z)(e))try{return t.fromRefract(JSON.parse(e))}catch{}return(0,Z.Z)(e)&&(0,H.Z)("element",e)?t.fromRefract(e):t.toElement(e)};var K=s(82601),W=s(47217),z=s(21485),X=s(21427);const Y=class extends X{constructor(e,t,s){if(super(e,t,s),this.name=this.constructor.name,"string"===typeof t&&(this.message=t),"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=s&&"object"===typeof s&&Object.hasOwn(s,"cause")&&!("cause"in this)){const{cause:e}=s;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack="".concat(this.stack,"\nCAUSE: ").concat(e.stack))}}};class Q extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(Y,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"===typeof e&&(this.message=e),"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"===typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack="".concat(this.stack,"\nCAUSE: ").concat(e.stack))}}}const ee=Q;const te=class extends ee{constructor(e,t){if(super(e,t),null!=t&&"object"===typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}},se=(e,t,s)=>{const i=e[t];if(null!=i){if(!s&&"function"===typeof i)return i;const e=s?i.leave:i.enter;if("function"===typeof e)return e}else{const i=s?e.leave:e.enter;if(null!=i){if("function"===typeof i)return i;const e=i[t];if("function"===typeof e)return e}}return null},ie={},ne=e=>null===e||void 0===e?void 0:e.type,re=e=>"string"===typeof ne(e),oe=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),ce=function(e,t){let{keyMap:s=null,state:i={},breakSymbol:n=ie,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=se,nodeTypeGetter:a=ne,nodePredicate:l=re,nodeCloneFn:p=oe,detectCycles:m=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,u,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const E=[],x=[];do{v+=1;const e=v===f.length;let s;const S=e&&0!==b.length;if(e){if(s=0===x.length?void 0:E.pop(),y=u,u=x.pop(),S)if(g){y=y.slice();let e=0;for(const[t,s]of b){const i=t-e;s===r?(y.splice(i,1),e+=1):y[i]=s}}else{y=p(y);for(const[e,t]of b)y[e]=t}v=d.index,f=d.keys,b=d.edits,g=d.inArray,d=d.prev}else if(u!==r&&void 0!==u){if(s=g?v:f[v],y=u[s],y===r||void 0===y)continue;E.push(s)}let j;if(!Array.isArray(y)){if(!l(y))throw new te("Invalid AST Node: ".concat(String(y)),{node:y});if(m&&x.includes(y)){E.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(i))t[e]=s;j=r.call(t,y,s,u,E,x)}if(j===n)break;if(j===o){if(!e){E.pop();continue}}else if(void 0!==j&&(b.push([s,j]),!e)){if(!l(j)){E.pop();continue}y=j}}var w;if(void 0===j&&S&&b.push([s,y]),!e)d={inArray:g,index:v,keys:f,edits:b,prev:d},g=Array.isArray(y),f=g?y:null!==(w=h[a(y)])&&void 0!==w?w:[],v=-1,b=[],u!==r&&void 0!==u&&x.push(u),u=y}while(void 0!==d);return 0!==b.length?b[b.length-1][1]:e};ce[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=null,state:i={},breakSymbol:n=ie,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=se,nodeTypeGetter:a=ne,nodePredicate:l=re,nodeCloneFn:p=oe,detectCycles:m=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,u,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const E=[],x=[];do{v+=1;const e=v===f.length;let s;const S=e&&0!==b.length;if(e){if(s=0===x.length?void 0:E.pop(),y=u,u=x.pop(),S)if(g){y=y.slice();let e=0;for(const[t,s]of b){const i=t-e;s===r?(y.splice(i,1),e+=1):y[i]=s}}else{y=p(y);for(const[e,t]of b)y[e]=t}v=d.index,f=d.keys,b=d.edits,g=d.inArray,d=d.prev}else if(u!==r&&void 0!==u){if(s=g?v:f[v],y=u[s],y===r||void 0===y)continue;E.push(s)}let j;if(!Array.isArray(y)){if(!l(y))throw new te("Invalid AST Node: ".concat(String(y)),{node:y});if(m&&x.includes(y)){E.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(i))t[e]=s;j=await r.call(t,y,s,u,E,x)}if(j===n)break;if(j===o){if(!e){E.pop();continue}}else if(void 0!==j&&(b.push([s,j]),!e)){if(!l(j)){E.pop();continue}y=j}}var w;if(void 0===j&&S&&b.push([s,y]),!e)d={inArray:g,index:v,keys:f,edits:b,prev:d},g=Array.isArray(y),f=g?y:null!==(w=h[a(y)])&&void 0!==w?w:[],v=-1,b=[],u!==r&&void 0!==u&&x.push(u),u=y}while(void 0!==d);return 0!==b.length?b[b.length-1][1]:e};var ae=s(46398),le=s(15944);const pe=(e,t)=>"object"===typeof t&&null!==t&&e in t&&"function"===typeof t[e],me=e=>"object"===typeof e&&null!=e&&"_storedElement"in e&&"string"===typeof e._storedElement&&"_content"in e,he=(e,t)=>"object"===typeof t&&null!==t&&"primitive"in t&&("function"===typeof t.primitive&&t.primitive()===e),de=(e,t)=>"object"===typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof M.ON)&&t.classes.includes(e),ue=(e,t)=>"object"===typeof t&&null!==t&&"element"in t&&t.element===e,ge=e=>e({hasMethod:pe,hasBasicElementProps:me,primitiveEq:he,isElementType:ue,hasClass:de}),fe=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof M.W_||t(e)&&s(void 0,e)})),ve=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof M.RP||t(e)&&s("string",e)})),be=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof M.VL||t(e)&&s("number",e)})),ye=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof M.zr||t(e)&&s("null",e)})),Ee=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof M.hh||t(e)&&s("boolean",e)})),xe=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:i}=e;return e=>e instanceof M.Sb||t(e)&&s("object",e)&&i("keys",e)&&i("values",e)&&i("items",e)})),we=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:i}=e;return e=>e instanceof M.ON&&!(e instanceof M.Sb)||t(e)&&s("array",e)&&i("push",e)&&i("unshift",e)&&i("map",e)&&i("reduce",e)})),Se=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof M.c6||t(e)&&s("member",e)&&i(void 0,e)})),je=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof M.EA||t(e)&&s("link",e)&&i(void 0,e)})),Pe=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof M.tK||t(e)&&s("ref",e)&&i(void 0,e)})),Oe=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof q||t(e)&&s("annotation",e)&&i("array",e)})),$e=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof k||t(e)&&s("comment",e)&&i("string",e)})),Be=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof C||t(e)&&s("parseResult",e)&&i("array",e)})),Me=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof N||t(e)&&s("sourceMap",e)&&i("array",e)})),Ze=e=>ue("object",e)||ue("array",e)||ue("boolean",e)||ue("number",e)||ue("string",e)||ue("null",e)||ue("member",e),Re=e=>Me(e.meta.get("sourceMap")),qe=(e,t)=>{if(0===e.length)return!0;const s=t.attributes.get("symbols");return!!we(s)&&(0,ae.Z)((0,le.Z)(s.toValue()),e)},Te=(e,t)=>0===e.length||(0,ae.Z)((0,le.Z)(t.classes.toValue()),e);const ke=class extends te{constructor(e,t){super(e,t),(0,K.Z)(this,"value",void 0),"undefined"!==typeof t&&(this.value=t.value)}};const Ae=class extends ke{};const Fe=class extends ke{},Ce=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{visited:s=new WeakMap}=t,i={...t,visited:s};if(s.has(e))return s.get(e);if(e instanceof M.KeyValuePair){const{key:t,value:n}=e,r=fe(t)?Ce(t,i):t,o=fe(n)?Ce(n,i):n,c=new M.KeyValuePair(r,o);return s.set(e,c),c}if(e instanceof M.rm){const t=e=>Ce(e,i),n=[...e].map(t),r=new M.rm(n);return s.set(e,r),r}if(e instanceof M.O4){const t=e=>Ce(e,i),n=[...e].map(t),r=new M.O4(n);return s.set(e,r),r}if(fe(e)){const t=De(e);if(s.set(e,t),e.content)if(fe(e.content))t.content=Ce(e.content,i);else if(e.content instanceof M.KeyValuePair)t.content=Ce(e.content,i);else if(Array.isArray(e.content)){const s=e=>Ce(e,i);t.content=e.content.map(s)}else t.content=e.content;else t.content=e.content;return t}throw new Ae("Value provided to cloneDeep function couldn't be cloned",{value:e})};Ce.safe=e=>{try{return Ce(e)}catch{return e}};const Ie=e=>{const{key:t,value:s}=e;return new M.KeyValuePair(t,s)},Ne=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=Ce(e.meta)),e.attributes.length>0&&(t._attributes=Ce(e.attributes)),fe(e.content)){const s=e.content;t.content=Ne(s)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof M.KeyValuePair?t.content=Ie(e.content):t.content=e.content;return t},De=e=>{if(e instanceof M.KeyValuePair)return Ie(e);if(e instanceof M.rm)return(e=>{const t=[...e];return new M.rm(t)})(e);if(e instanceof M.O4)return(e=>{const t=[...e];return new M.O4(t)})(e);if(fe(e))return Ne(e);throw new Fe("Value provided to cloneShallow function couldn't be cloned",{value:e})};De.safe=e=>{try{return De(e)}catch{return e}};const Ve=e=>xe(e)?"ObjectElement":we(e)?"ArrayElement":Se(e)?"MemberElement":ve(e)?"StringElement":Ee(e)?"BooleanElement":be(e)?"NumberElement":ye(e)?"NullElement":je(e)?"LinkElement":Pe(e)?"RefElement":void 0,Le=e=>fe(e)?De(e):oe(e),Je=(0,W.Z)(Ve,_.Z),Ue={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class He{constructor(){let{predicate:e=z.Z,returnOnTrue:t,returnOnFalse:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,K.Z)(this,"result",void 0),(0,K.Z)(this,"predicate",void 0),(0,K.Z)(this,"returnOnTrue",void 0),(0,K.Z)(this,"returnOnFalse",void 0),this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=s}enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}const _e=function(e,t){let{keyMap:s=Ue,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ce(e,t,{keyMap:s,nodeTypeGetter:Ve,nodePredicate:Je,nodeCloneFn:Le,...i})};_e[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=Ue,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ce[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:s,nodeTypeGetter:Ve,nodePredicate:Je,nodeCloneFn:Le,...i})};class Ge{constructor(){(0,K.Z)(this,"result",""),(0,K.Z)(this,"nestingLevel",0)}enter(e){const{element:t}=e,s=t.charAt(0).toUpperCase()+t.slice(1),i=" ".repeat(this.nestingLevel);this.result+=this.nestingLevel>0?"\n":"",this.result+="".concat(i,"(").concat(s,"Element"),this.nestingLevel+=1}leave(){this.nestingLevel-=1,this.result+=")"}}const Ke=e=>{const t=new Ge;return _e(e,t),t.result};var We=s(66557);const ze=e=>"string"===typeof(null===e||void 0===e?void 0:e.type)?e.type:Ve(e),Xe={EphemeralObject:["content"],EphemeralArray:["content"],...Ue},Ye=function(e,t){let{keyMap:s=Xe,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _e(e,t,{keyMap:s,nodeTypeGetter:ze,nodePredicate:We.Z,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...i})};Ye[Symbol.for("nodejs.util.promisify.custom")]=async function(e){let{keyMap:t=Xe,...s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _e[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:ze,nodePredicate:We.Z,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...s})};const Qe=class{constructor(e){(0,K.Z)(this,"type","EphemeralArray"),(0,K.Z)(this,"content",[]),(0,K.Z)(this,"reference",void 0),this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const et=class{constructor(e){(0,K.Z)(this,"type","EphemeralObject"),(0,K.Z)(this,"content",[]),(0,K.Z)(this,"reference",void 0),this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class tt{constructor(){(0,K.Z)(this,"ObjectElement",{enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new et(e.content);return this.references.set(e,t),t}}),(0,K.Z)(this,"EphemeralObject",{leave:e=>e.toObject()}),(0,K.Z)(this,"MemberElement",{enter:e=>[e.key,e.value]}),(0,K.Z)(this,"ArrayElement",{enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new Qe(e.content);return this.references.set(e,t),t}}),(0,K.Z)(this,"EphemeralArray",{leave:e=>e.toArray()}),(0,K.Z)(this,"references",new WeakMap)}BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}}const st=e=>fe(e)?ve(e)||be(e)||Ee(e)||ye(e)?e.toValue():Ye(e,new tt):e;var it=s(67675),nt=s(34830),rt=s(31064);const ot=class extends ee{};const ct=class extends ot{};const at=class extends Array{constructor(){super(...arguments),(0,K.Z)(this,"unknownMediaType","application/octet-stream")}filterByFormat(){throw new ct("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new ct("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new ct("latest method in MediaTypes class is not yet implemented.")}};const lt=class extends te{constructor(e,t){super(e,t),(0,K.Z)(this,"source",void 0),(0,K.Z)(this,"parserOptions",void 0),"undefined"!==typeof t&&(this.source=t.source,this.parserOptions=t.parserOptions)}};const pt=class{constructor(){(0,K.Z)(this,"adapters",[])}async detectAdapterCandidates(e){const t=[];for(const s of this.adapters)(0,nt.Z)(s.detect)&&await s.detect(e)&&t.push(s);return t}async findAdapter(e,t){if((0,_.Z)(t))return this.adapters.find((e=>!!(0,rt.Z)(e.mediaTypes)&&e.mediaTypes.includes(t)));const s=await this.detectAdapterCandidates(e);return(0,it.Z)(s)}use(e){return this.adapters.push(e),this}async findNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=await this.findAdapter(e,t.mediaType);return null===s||void 0===s?void 0:s.namespace}async findMediaType(e){const t=await this.findAdapter(e,void 0);if("undefined"===typeof t)return(new at).unknownMediaType;if("undefined"===typeof t.mediaTypes)return(new at).unknownMediaType;if("undefined"===typeof t.detectionRegExp)return t.mediaTypes.latest();const{detectionRegExp:s}=t,i=e.match(s);if(null===i)return(new at).unknownMediaType;const{groups:n}=i,r=(null===n||void 0===n?void 0:n.version)||(null===n||void 0===n?void 0:n.version_json)||(null===n||void 0===n?void 0:n.version_yaml),o=null!==n&&void 0!==n&&n.version_json?"json":null!==n&&void 0!==n&&n.version_yaml?"yaml":"generic";return"undefined"===typeof r?t.mediaTypes.latest():t.mediaTypes.findBy(r,o)}async parse(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{t=await this.findAdapter(e,s.mediaType)}catch(i){throw new lt("Encountered an unexpected error while matching parser adapters against the source.",{source:e,parserOptions:s,cause:i})}if((0,A.Z)(t))throw new lt("Source did not match any registered parsers",{source:e,parserOptions:s});try{return t.parse(e,s)}catch(i){throw new lt("Parsing encountered an unexpected error.",{source:e,parserOptions:s,cause:i})}}};var mt=s(44245),ht=s(22376);const dt=globalThis.fetch;(0,nt.Z)(dt)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===ft&&null===vt)vt=ut.init().then((()=>ut.Language.load(gt))).then((e=>{const t=new ut;return t.setLanguage(e),t})).finally((()=>{vt=null})),ft=await vt;else if(null===ft&&null!==vt)ft=await vt;else if(null===ft)throw new ee("Error while initializing web-tree-sitter and loading tree-sitter-json grammar.");return ft.parse(e)};var yt=s(1546),Et=s(26418),xt=s(37361);const wt=()=>({predicates:{...i},namespace:J}),St={toolboxCreator:wt,visitorOptions:{nodeTypeGetter:Ve,exposeEdits:!0}},jt=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===t.length)return e;const i=(0,yt.Z)(St,s),{toolboxCreator:n,visitorOptions:r}=i,o=n(),c=t.map((e=>e(o))),a=function(e){let{visitFnGetter:t=se,nodeTypeGetter:s=ne,breakSymbol:i=ie,deleteNodeSymbol:n=null,skipVisitingNodeSymbol:r=!1,exposeEdits:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c=Symbol("skip"),a=new Array(e.length).fill(c);return{enter(l){let p=l,m=!1;for(var h=arguments.length,d=new Array(h>1?h-1:0),u=1;u1?o-1:0),p=1;p{let{Type:s,plugins:i=[]}=t;const n=new s(e);return jt(n,i,{toolboxCreator:wt,visitorOptions:{nodeTypeGetter:Ve}})},Ot=e=>function(t){return Pt(t,{...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Type:e})};M.Sb.refract=Ot(M.Sb),M.ON.refract=Ot(M.ON),M.RP.refract=Ot(M.RP),M.hh.refract=Ot(M.hh),M.zr.refract=Ot(M.zr),M.VL.refract=Ot(M.VL),M.EA.refract=Ot(M.EA),M.tK.refract=Ot(M.tK),q.refract=Ot(q),k.refract=Ot(k),C.refract=Ot(C),N.refract=Ot(N);const $t=class{constructor(e){(0,K.Z)(this,"type",void 0),(0,K.Z)(this,"startPosition",void 0),(0,K.Z)(this,"endPosition",void 0),(0,K.Z)(this,"startIndex",void 0),(0,K.Z)(this,"endIndex",void 0),(0,K.Z)(this,"text",void 0),(0,K.Z)(this,"isNamed",void 0),(0,K.Z)(this,"isMissing",void 0),(0,K.Z)(this,"fieldName",void 0),(0,K.Z)(this,"hasError",!1),(0,K.Z)(this,"children",[]),this.type=e.nodeType,this.startPosition=e.startPosition,this.endPosition=e.endPosition,this.startIndex=e.startIndex,this.endIndex=e.endIndex,this.text=e.nodeText,this.isNamed=e.nodeIsNamed,this.isMissing=e.nodeIsMissing}get keyNode(){if("pair"===this.type)return this.children.find((e=>"key"===e.fieldName))}get valueNode(){if("pair"===this.type)return this.children.find((e=>"value"===e.fieldName))}setFieldName(e){return"function"===typeof e.currentFieldName?this.fieldName=e.currentFieldName():this.fieldName=e.currentFieldName,this}setHasError(e){return"function"===typeof e.currentNode?this.hasError=e.currentNode().hasError():this.hasError=e.currentNode.hasError(),this}pushChildren(){this.children.push(...arguments)}};class Bt{static toPosition(e){const t=new M.ON([e.startPosition.row,e.startPosition.column,e.startIndex]),s=new M.ON([e.endPosition.row,e.endPosition.column,e.endIndex]);return t.classes.push("position"),s.classes.push("position"),[t,s]}constructor(){(0,K.Z)(this,"sourceMap",!1),(0,K.Z)(this,"annotations",void 0),(0,K.Z)(this,"ParseResultElement",{leave:e=>{const t=e.findElements(Ze);if(t.length>0){t[0].classes.push("result")}this.annotations.forEach((t=>{e.push(t)})),this.annotations=[]}}),this.annotations=[]}enter(e){if(e instanceof $t&&!e.isNamed&&e.isMissing){const t=e.type||e.text,s="(Missing ".concat(t,")"),i=new q(s);i.classes.push("warning"),this.maybeAddSourceMap(e,i),this.annotations.push(i)}return null}document(e){const t=new C;return t._content=e.children,this.maybeAddSourceMap(e,t),t}object(e){const t=new M.Sb;return t._content=e.children,this.maybeAddSourceMap(e,t),t}array(e){const t=new M.ON;return t._content=e.children,this.maybeAddSourceMap(e,t),t}pair(e){const t=new M.c6;return t.content.key=e.keyNode,t.content.value=e.valueNode,this.maybeAddSourceMap(e,t),e.children.length>3&&e.children.filter((e=>"ERROR"===e.type)).forEach((t=>{this.ERROR(t,e,[],[e])})),t}string(e){const t=new M.RP(JSON.parse(e.text));return this.maybeAddSourceMap(e,t),t}number(e){const t=new M.VL(Number(e.text));return this.maybeAddSourceMap(e,t),t}null(e){const t=new M.zr;return this.maybeAddSourceMap(e,t),t}true(e){const t=new M.hh(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new M.hh(!1);return this.maybeAddSourceMap(e,t),t}ERROR(e,t,s,i){const n=!e.hasError,r=e.text,o=n?"(Unexpected ".concat(r,")"):"(Error ".concat(r,")"),c=new q(o);if(c.classes.push("error"),this.maybeAddSourceMap(e,c),0===i.length){const e=new C;return e.push(c),e}return this.annotations.push(c),null}maybeAddSourceMap(e,t){if(!this.sourceMap)return;const s=new N,i=Bt.toPosition(e);if(null!==i){const[e,t]=i;s.push(e),s.push(t)}s.astNode=e,t.meta.set("sourceMap",s)}}const Mt=Bt;let Zt;Zt=Symbol.iterator;class Rt{constructor(e){(0,K.Z)(this,"cursor",void 0),this.cursor=e}document(){return new $t(this.cursor)}object(){return new $t(this.cursor).setFieldName(this.cursor)}array(){return new $t(this.cursor).setFieldName(this.cursor)}pair(){return new $t(this.cursor)}string(){return new $t(this.cursor).setFieldName(this.cursor)}number(){return new $t(this.cursor).setFieldName(this.cursor)}null(){return new $t(this.cursor).setFieldName(this.cursor)}true(){return new $t(this.cursor).setFieldName(this.cursor)}false(){return new $t(this.cursor).setFieldName(this.cursor)}ERROR(){return new $t(this.cursor).setHasError(this.cursor)}*[Zt](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new $t(this.cursor),this.cursor.gotoFirstChild()){const[t]=new Rt(this.cursor);for(e.pushChildren(t);this.cursor.gotoNextSibling();){const t=new Rt(this.cursor);e.pushChildren(...t)}this.cursor.gotoParent()}yield e}}const qt=Rt,Tt={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"],...Ue},kt=e=>Be(e)?"ParseResultElement":fe(e)?Ve(e):ne(e),At=e=>fe(e)||re(e),Ft=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new Mt,i=e.walk(),n=new qt(i),[r]=Array.from(n);return ce(r,s,{keyMap:Tt,nodeTypeGetter:kt,nodePredicate:At,state:{sourceMap:t}})};class Ct{constructor(){let{children:e=[],position:t,isMissing:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,K.Z)(this,"type","node"),(0,K.Z)(this,"isMissing",void 0),(0,K.Z)(this,"children",void 0),(0,K.Z)(this,"position",void 0),this.type=this.constructor.type,this.isMissing=s,this.children=e,this.position=t}clone(){const e=Object.create(Object.getPrototypeOf(this));return Object.getOwnPropertyNames(this).forEach((t=>{const s=Object.getOwnPropertyDescriptor(this,t);Object.defineProperty(e,t,s)})),e}}(0,K.Z)(Ct,"type","node");const It=Ct;const Nt=class extends It{};class Dt extends Nt{get child(){return(0,it.Z)(this.children)}}(0,K.Z)(Dt,"type","document");const Vt=Dt;class Lt extends It{get rootNode(){return(0,it.Z)(this.children)}}(0,K.Z)(Lt,"type","parseResult");const Jt=Lt;class Ut{constructor(e){let{row:t,column:s,char:i}=e;(0,K.Z)(this,"type",Ut.type),(0,K.Z)(this,"row",void 0),(0,K.Z)(this,"column",void 0),(0,K.Z)(this,"char",void 0),this.row=t,this.column=s,this.char=i}}(0,K.Z)(Ut,"type","point");class Ht{constructor(e){let{start:t,end:s}=e;(0,K.Z)(this,"type",Ht.type),(0,K.Z)(this,"start",void 0),(0,K.Z)(this,"end",void 0),this.start=t,this.end=s}}(0,K.Z)(Ht,"type","position");const _t=Ht;class Gt extends It{constructor(){let{value:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...t}),(0,K.Z)(this,"value",void 0),this.value=e}}(0,K.Z)(Gt,"type","literal");const Kt=Gt,Wt=(e,t)=>null!=t&&"object"===typeof t&&"type"in t&&t.type===e,zt=e=>Wt("string",e),Xt=e=>Wt("false",e),Yt=e=>Wt("true",e),Qt=e=>Wt("null",e),es=e=>Wt("number",e),ts=e=>Wt("array",e),ss=e=>Wt("object",e),is=e=>Wt("property",e),ns=e=>Wt("key",e);class rs extends Nt{get properties(){return this.children.filter(is)}}(0,K.Z)(rs,"type","object");const os=rs;class cs extends Nt{get value(){if(1===this.children.length){return this.children[0].value}return this.children.filter((e=>(e=>Wt("stringContent",e))(e)||(e=>Wt("escapeSequence",e))(e))).reduce(((e,t)=>e+t.value),"")}}(0,K.Z)(cs,"type","string");const as=cs;class ls extends as{}(0,K.Z)(ls,"type","key");const ps=ls;class ms extends Nt{get key(){return this.children.find(ns)}get value(){return this.children.find((e=>Xt(e)||Yt(e)||Qt(e)||es(e)||zt(e)||ts(e)||ss(e)))}}(0,K.Z)(ms,"type","property");const hs=ms;class ds extends Nt{get items(){return this.children.filter((e=>Xt(e)||Yt(e)||Qt(e)||es(e)||zt(e)||ts(e)||ss))}}(0,K.Z)(ds,"type","array");const us=ds;class gs extends Nt{constructor(e){let{value:t,...s}=e;super({...s}),(0,K.Z)(this,"value",void 0),this.value=t}}(0,K.Z)(gs,"type","value");const fs=gs;class vs extends fs{}(0,K.Z)(vs,"type","stringContent");const bs=vs;class ys extends fs{}(0,K.Z)(ys,"type","number");const Es=ys;class xs extends fs{}(0,K.Z)(xs,"type","null");const ws=xs;class Ss extends fs{}(0,K.Z)(Ss,"type","true");const js=Ss;class Ps extends fs{}(0,K.Z)(Ps,"type","false");const Os=Ps;class $s extends It{constructor(){let{value:e,isUnexpected:t=!1,...s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...s}),(0,K.Z)(this,"value",void 0),(0,K.Z)(this,"isUnexpected",void 0),this.value=e,this.isUnexpected=t}}(0,K.Z)($s,"type","error");const Bs=$s,Ms={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"]};class Zs{constructor(){(0,K.Z)(this,"document",{enter:e=>{const t=Zs.toPosition(e);return new Vt({children:e.children,position:t,isMissing:e.isMissing})},leave:e=>new Jt({children:[e]})})}static toPosition(e){const t=new Ut({row:e.startPosition.row,column:e.startPosition.column,char:e.startIndex}),s=new Ut({row:e.endPosition.row,column:e.endPosition.column,char:e.endIndex});return new _t({start:t,end:s})}enter(e){if(e instanceof $t&&!e.isNamed){const t=Zs.toPosition(e),s=e.type||e.text,{isMissing:i}=e;return new Kt({value:s,position:t,isMissing:i})}}object(e){const t=Zs.toPosition(e);return new os({children:e.children,position:t,isMissing:e.isMissing})}pair(e){const t=Zs.toPosition(e),s=e.children.slice(1),{keyNode:i}=e,n=new ps({children:(null===i||void 0===i?void 0:i.children)||[],position:null!=i?Zs.toPosition(i):void 0,isMissing:null!=i&&i.isMissing});return new hs({children:[n,...s],position:t,isMissing:e.isMissing})}array(e){const t=Zs.toPosition(e);return new us({children:e.children,position:t,isMissing:e.isMissing})}string(e){const t=Zs.toPosition(e),s=new bs({value:JSON.parse(e.text)});return new as({children:[s],position:t,isMissing:e.isMissing})}number(e){const t=Zs.toPosition(e),s=e.text;return new Es({value:s,position:t,isMissing:e.isMissing})}null(e){const t=Zs.toPosition(e),s=e.text;return new ws({value:s,position:t,isMissing:e.isMissing})}true(e){const t=Zs.toPosition(e),s=e.text;return new js({value:s,position:t,isMissing:e.isMissing})}false(e){const t=Zs.toPosition(e),s=e.text;return new Os({value:s,position:t,isMissing:e.isMissing})}ERROR(e,t,s,i){const n=Zs.toPosition(e),r=new Bs({children:e.children,position:n,isUnexpected:!e.hasError,isMissing:e.isMissing,value:e.text});return 0===i.length?new Jt({children:[r]}):r}}const Rs=Zs,qs={[Jt.type]:["children"],[Vt.type]:["children"],[os.type]:["children"],[hs.type]:["children"],[us.type]:["children"],[Bs.type]:["children"],...Ue},Ts=e=>Be(e)?"ParseResultElement":fe(e)?Ve(e):ne(e),ks=e=>fe(e)||re(e);const As=class{constructor(){(0,K.Z)(this,"sourceMap",!1),(0,K.Z)(this,"annotations",void 0),(0,K.Z)(this,"ParseResultElement",{leave:e=>{const t=e.findElements(Ze);if(t.length>0){t[0].classes.push("result")}this.annotations.forEach((t=>{e.push(t)})),this.annotations=[]}}),this.annotations=[]}document(e){const t=new C;return t._content=e.children,t}object(e){const t=new M.Sb;return t._content=e.children,this.maybeAddSourceMap(e,t),t}property(e){const t=new M.c6;return t.content.key=e.key,t.content.value=e.value,this.maybeAddSourceMap(e,t),e.children.length>3&&e.children.filter((e=>"error"===e.type)).forEach((t=>{this.error(t,e,[],[e])})),t}key(e){const t=new M.RP(e.value);return this.maybeAddSourceMap(e,t),t}array(e){const t=new M.ON;return t._content=e.children,this.maybeAddSourceMap(e,t),t}string(e){const t=new M.RP(e.value);return this.maybeAddSourceMap(e,t),t}number(e){const t=new M.VL(Number(e.value));return this.maybeAddSourceMap(e,t),t}null(e){const t=new M.zr;return this.maybeAddSourceMap(e,t),t}true(e){const t=new M.hh(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new M.hh(!1);return this.maybeAddSourceMap(e,t),t}literal(e){if(e.isMissing){const t="(Missing ".concat(e.value,")"),s=new q(t);s.classes.push("warning"),this.maybeAddSourceMap(e,s),this.annotations.push(s)}return null}error(e,t,s,i){const n=e.isUnexpected?"(Unexpected ".concat(e.value,")"):"(Error ".concat(e.value,")"),r=new q(n);if(r.classes.push("error"),this.maybeAddSourceMap(e,r),0===i.length){const e=new C;return e.push(r),e}return this.annotations.push(r),null}maybeAddSourceMap(e,t){if(!this.sourceMap)return;const s=new N;s.position=e.position,s.astNode=e,t.meta.set("sourceMap",s)}},Fs=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=e.walk(),i=new qt(s),[n]=Array.from(i),r=new Rs,o=new As,c=ce(n,r,{keyMap:Ms,state:{sourceMap:t}});return ce(c.rootNode,o,{keyMap:qs,nodeTypeGetter:Ts,nodePredicate:ks,state:{sourceMap:t}})},Cs=L(),Is=/(?^\s*true\s*$)|(?^\s*false\s*$)|(?^\s*null\s*$)|(?^\s*\d+\s*$)|(?^\s*{\s*)|(?^\s*\[\s*)|(?^\s*"(((?=\\)\\(["\\/bfnrt]|u[0-9a-fA-F]{4}))|[^"\\\x00-\x1F\x7F])*"\s*$)/;const Ns=new class extends at{latest(){return this[0]}}("application/json"),Ds=async e=>{if(!Is.test(e))return!1;try{return"ERROR"!==(await bt(e)).rootNode.type}catch{return!1}},Vs=async function(e){let{sourceMap:t=!1,syntacticAnalysis:s="direct"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=await bt(e);let n;return n="indirect"===s?Fs(i,{sourceMap:t}):Ft(i,{sourceMap:t}),n},Ls=globalThis.fetch;(0,nt.Z)(Ls)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===Us&&null===Hs)Hs=ut.init().then((()=>ut.Language.load(Js))).then((e=>{const t=new ut;return t.setLanguage(e),t})).finally((()=>{Hs=null})),Us=await Hs;else if(null===Us&&null!==Hs)Us=await Hs;else if(null===Us)throw new ee("Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.");return Us.parse(e)};var Gs=s(82801);const Ks=class extends te{};const Ws=class extends Ks{constructor(e,t){super(e,t),(0,K.Z)(this,"specificTagName",void 0),(0,K.Z)(this,"explicitTagName",void 0),(0,K.Z)(this,"tagKind",void 0),(0,K.Z)(this,"tagPosition",void 0),(0,K.Z)(this,"nodeCanonicalContent",void 0),(0,K.Z)(this,"node",void 0),"undefined"!==typeof t&&(this.specificTagName=t.specificTagName,this.explicitTagName=t.explicitTagName,this.tagKind=t.tagKind,this.tagPosition=t.tagPosition,this.nodeCanonicalContent=t.nodeCanonicalContent,this.node=t.node)}};let zs=function(e){return e.Scalar="Scalar",e.Sequence="Sequence",e.Mapping="Mapping",e}({});class Xs extends It{constructor(e){let{explicitName:t,kind:s,...i}=e;super({...i}),(0,K.Z)(this,"explicitName",void 0),(0,K.Z)(this,"kind",void 0),this.explicitName=t,this.kind=s}}(0,K.Z)(Xs,"type","tag");const Ys=Xs;class Qs{constructor(){(0,K.Z)(this,"tag",""),this.tag=this.constructor.uri}test(e){return!0}resolve(e){return e}}(0,K.Z)(Qs,"uri","");const ei=Qs;class ti extends ei{test(e){return e.tag.kind===zs.Mapping}}(0,K.Z)(ti,"uri","tag:yaml.org,2002:map");const si=ti;class ii extends ei{test(e){return e.tag.kind===zs.Sequence}}(0,K.Z)(ii,"uri","tag:yaml.org,2002:seq");const ni=ii;class ri extends ei{}(0,K.Z)(ri,"uri","tag:yaml.org,2002:str");const oi=ri;var ci=s(28854),ai=s(50495),li=s(89615),pi=s(32841),mi=s(75631),hi=s(26181),di=s(4293),ui=s(55514),gi=s(52776),fi=s(97307),vi=s(32157),bi=s(45278),yi=s(44174),Ei=s(54959),xi=s(33279),wi=s(21031),Si=s(70220);const ji=/^(?