diff --git a/asset-manifest.json b/asset-manifest.json
index 49dc88435c..0ca7997c81 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.b0ad775a.js",
- "static/js/680.726c8366.chunk.js": "/apidom/static/js/680.726c8366.chunk.js",
+ "main.js": "/apidom/static/js/main.f1bbe31a.js",
+ "static/js/144.9ba7a39f.chunk.js": "/apidom/static/js/144.9ba7a39f.chunk.js",
"static/js/18.64e3be8e.chunk.js": "/apidom/static/js/18.64e3be8e.chunk.js",
"static/js/884.c3fdbcc7.chunk.js": "/apidom/static/js/884.c3fdbcc7.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.64a30dfa8a51b6a090eb.wasm",
"index.html": "/apidom/index.html",
"main.e6c13ad2.css.map": "/apidom/static/css/main.e6c13ad2.css.map",
- "main.b0ad775a.js.map": "/apidom/static/js/main.b0ad775a.js.map",
- "680.726c8366.chunk.js.map": "/apidom/static/js/680.726c8366.chunk.js.map",
+ "main.f1bbe31a.js.map": "/apidom/static/js/main.f1bbe31a.js.map",
+ "144.9ba7a39f.chunk.js.map": "/apidom/static/js/144.9ba7a39f.chunk.js.map",
"18.64e3be8e.chunk.js.map": "/apidom/static/js/18.64e3be8e.chunk.js.map",
"884.c3fdbcc7.chunk.js.map": "/apidom/static/js/884.c3fdbcc7.chunk.js.map"
},
"entrypoints": [
"static/css/main.e6c13ad2.css",
- "static/js/main.b0ad775a.js"
+ "static/js/main.f1bbe31a.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index c3ac96c28a..0e642c52dd 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/144.9ba7a39f.chunk.js b/static/js/144.9ba7a39f.chunk.js
new file mode 100644
index 0000000000..0e6d3f36ac
--- /dev/null
+++ b/static/js/144.9ba7a39f.chunk.js
@@ -0,0 +1,2 @@
+(()=>{var e={47988:(e,t,s)=>{"use strict";var n={};s.r(n),s.d(n,{hasElementSourceMap:()=>Re,includesClasses:()=>Ae,includesSymbols:()=>Te,isAnnotationElement:()=>$e,isArrayElement:()=>we,isBooleanElement:()=>xe,isCommentElement:()=>Oe,isElement:()=>fe,isLinkElement:()=>Se,isMemberElement:()=>je,isNullElement:()=>ye,isNumberElement:()=>be,isObjectElement:()=>Ee,isParseResultElement:()=>qe,isPrimitiveElement:()=>Me,isRefElement:()=>Pe,isSourceMapElement:()=>Be,isStringElement:()=>ve});var i={};s.r(i),s.d(i,{detect:()=>Vs,detectionRegExp:()=>Ds,lexicalAnalysis:()=>bt,mediaTypes:()=>Ns,namespace:()=>Is,parse:()=>Ws,syntacticAnalysis:()=>Ct,syntacticAnalysisDirect:()=>Ct,syntacticAnalysisIndirect:()=>Cs});var r={};s.r(r),s.d(r,{detect:()=>Wi,lexicalAnalysis:()=>_s,mediaTypes:()=>Vi,namespace:()=>Ni,parse:()=>Li,syntacticAnalysis:()=>Di});var o={};s.r(o),s.d(o,{isJSONReferenceElement:()=>Bo,isJSONSchemaElement:()=>qo,isLinkDescriptionElement:()=>Ro,isMediaElement:()=>Mo});var c={};s.r(c),s.d(c,{isReferenceLikeElement:()=>xc,isSwaggerExtension:()=>yc});var a={};s.r(a),s.d(a,{isContactElement:()=>na,isDefinitionsElement:()=>Ea,isExampleElement:()=>da,isExternalDocumentationElement:()=>ca,isHeaderElement:()=>ma,isHeadersElement:()=>ha,isInfoElement:()=>ta,isItemsElement:()=>la,isLicenseElement:()=>sa,isOperationElement:()=>oa,isParameterElement:()=>aa,isParametersDefinitionsElement:()=>wa,isPathItemElement:()=>ra,isPathsElement:()=>ia,isReferenceElement:()=>fa,isResponseElement:()=>ua,isResponsesDefinitionsElement:()=>ya,isResponsesElement:()=>pa,isSchemaElement:()=>va,isScopesElement:()=>Sa,isSecurityDefinitionsElement:()=>xa,isSecurityRequirementElement:()=>Pa,isSecuritySchemeElement:()=>ja,isSwaggerElement:()=>Zc,isSwaggerVersionElement:()=>ea,isTagElement:()=>ga,isXmlElement:()=>ba});var l={};s.r(l),s.d(l,{detect:()=>yp,detectionRegExp:()=>bp,mediaTypes:()=>vp,namespace:()=>Ep,parse:()=>xp});var p={};s.r(p),s.d(p,{detect:()=>Sp,detectionRegExp:()=>jp,mediaTypes:()=>wp,namespace:()=>$p,parse:()=>Pp});var u={};s.r(u),s.d(u,{isOpenApiExtension:()=>Vu,isReferenceLikeElement:()=>Iu,isServerLikeElement:()=>Du,isTagLikeElement:()=>Nu});var h={};s.r(h),s.d(h,{isBooleanJsonSchemaElement:()=>_h,isCallbackElement:()=>$h,isComponentsElement:()=>Oh,isContactElement:()=>qh,isExampleElement:()=>Bh,isExternalDocumentationElement:()=>Mh,isHeaderElement:()=>Rh,isInfoElement:()=>Th,isLicenseElement:()=>Ah,isLinkElement:()=>kh,isMediaTypeElement:()=>Xh,isOpenApi3_0Element:()=>Ch,isOpenapiElement:()=>Fh,isOperationElement:()=>Ih,isParameterElement:()=>Dh,isPathItemElement:()=>Nh,isPathsElement:()=>Vh,isReferenceElement:()=>Wh,isRequestBodyElement:()=>Lh,isResponseElement:()=>Uh,isResponsesElement:()=>Jh,isSchemaElement:()=>Hh,isSecurityRequirementElement:()=>Gh,isServerElement:()=>Qh,isServerVariableElement:()=>Kh,isServersElement:()=>zh});var d={};s.r(d),s.d(d,{detect:()=>Nf,detectionRegExp:()=>Df,mediaTypes:()=>If,namespace:()=>Wf,parse:()=>Vf});var m={};s.r(m),s.d(m,{detect:()=>Jf,detectionRegExp:()=>Uf,mediaTypes:()=>Lf,namespace:()=>_f,parse:()=>Hf});var g={};s.r(g),s.d(g,{isBooleanJsonSchemaElement:()=>Bb,isCallbackElement:()=>ob,isComponentsElement:()=>cb,isContactElement:()=>ab,isExampleElement:()=>lb,isExternalDocumentationElement:()=>pb,isHeaderElement:()=>ub,isInfoElement:()=>hb,isJsonSchemaDialectElement:()=>db,isLicenseElement:()=>mb,isLinkElement:()=>gb,isMediaTypeElement:()=>Ab,isOpenApi3_1Element:()=>vb,isOpenapiElement:()=>fb,isOperationElement:()=>bb,isParameterElement:()=>yb,isPathItemElement:()=>xb,isPathItemElementExternal:()=>Eb,isPathsElement:()=>wb,isReferenceElement:()=>jb,isReferenceElementExternal:()=>Sb,isRequestBodyElement:()=>Pb,isResponseElement:()=>$b,isResponsesElement:()=>Ob,isSchemaElement:()=>qb,isSecurityRequirementElement:()=>Mb,isServerElement:()=>Rb,isServerVariableElement:()=>Tb});var f={};s.r(f),s.d(f,{detect:()=>sx,detectionRegExp:()=>tx,mediaTypes:()=>ex,namespace:()=>ix,parse:()=>nx});var v={};s.r(v),s.d(v,{detect:()=>cx,detectionRegExp:()=>ox,mediaTypes:()=>rx,namespace:()=>lx,parse:()=>ax});var b={};s.r(b),s.d(b,{isJSONReferenceElement:()=>Bo,isJSONSchemaElement:()=>Sx,isLinkDescriptionElement:()=>Px,isMediaElement:()=>Mo});var y={};s.r(y),s.d(y,{isJSONReferenceElement:()=>Bo,isJSONSchemaElement:()=>hw,isLinkDescriptionElement:()=>dw});var x={};s.r(x),s.d(x,{isAsyncApi2Element:()=>Ow,isAsyncApiVersionElement:()=>qw,isBooleanJsonSchemaElement:()=>Lw,isChannelBindingsElement:()=>Bw,isChannelItemElement:()=>Mw,isChannelsElement:()=>Rw,isComponentsElement:()=>Tw,isContactElement:()=>Aw,isIdentifierElement:()=>kw,isInfoElement:()=>Fw,isLicenseElement:()=>Cw,isOperationElement:()=>Iw,isParameterElement:()=>Dw,isParametersElement:()=>Nw,isReferenceElement:()=>Vw,isSchemaElement:()=>Ww,isSecurityRequirementElement:()=>Uw,isServerBindingsElement:()=>Hw,isServerElement:()=>Jw,isServerVariableElement:()=>Gw,isServersElement:()=>_w});var E={};s.r(E),s.d(E,{detect:()=>CT,detectionRegExp:()=>FT,mediaTypes:()=>kT,namespace:()=>DT,parse:()=>IT});var w={};s.r(w),s.d(w,{detect:()=>WT,detectionRegExp:()=>VT,mediaTypes:()=>NT,namespace:()=>UT,parse:()=>LT});var j={};s.r(j),s.d(j,{isReferenceLikeElement:()=>yA,isWorkflowsSpecificationExtension:()=>bA});var S={};s.r(S),s.d(S,{isComponentsElement:()=>Rk,isCriterionElement:()=>Tk,isFailureActionCriteriaElement:()=>Ck,isFailureActionElement:()=>Fk,isInfoElement:()=>gk,isJSONSchemaElement:()=>Ik,isParameterElement:()=>Bk,isReferenceElement:()=>Ak,isSourceDescriptionElement:()=>fk,isSourceDescriptionsElement:()=>vk,isStepDependsOnElement:()=>Ok,isStepElement:()=>Pk,isStepOnFailureElement:()=>jk,isStepOnSuccessElement:()=>wk,isStepOutputsElement:()=>Sk,isStepParametersElement:()=>$k,isStepSuccessCriteriaElement:()=>qk,isSuccessActionCriteriaElement:()=>kk,isSuccessActionElement:()=>Mk,isWorkflowElement:()=>Ek,isWorkflowOutputsElement:()=>xk,isWorkflowStepsElement:()=>yk,isWorkflowsElement:()=>bk,isWorkflowsSpecElement:()=>dk,isWorkflowsSpecification1Element:()=>mk});var P={};s.r(P),s.d(P,{detect:()=>DF,detectionRegExp:()=>IF,mediaTypes:()=>CF,namespace:()=>VF,parse:()=>NF});var $={};s.r($),s.d($,{detect:()=>UF,detectionRegExp:()=>LF,mediaTypes:()=>WF,namespace:()=>HF,parse:()=>JF});var O={};s.r(O),s.d(O,{isInfoElement:()=>BD,isMainElement:()=>qD,isPrincipleElement:()=>MD,isRequirementElement:()=>RD,isRequirementLevelElement:()=>TD,isScenarioElement:()=>AD,isStandardElement:()=>kD,isStandardIdentifierElement:()=>FD});var q=s(22764),B=s(64508),M=s(34968);class R extends B.M${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 T=R;class A extends B.M${constructor(e,t,s){super(e,t,s),this.element="comment"}}const k=A;var F=s(89600);class C extends B.uQ{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,F.c)(t))return!1;const s=this.content.findIndex((e=>e===t));return-1!==s&&(this.content[s]=e,!0)}}const I=C;class D extends B.uQ{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 B.uQ([e.start.row,e.start.column,e.start.char]),s=new B.uQ([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),s.classes.push("position"),this.push(t).push(s)}}const N=D;class V extends B.MH{constructor(){super(),this.register("annotation",T),this.register("comment",k),this.register("parseResult",I),this.register("sourceMap",N)}}const W=new V,L=e=>{const t=new V;return(0,M.c)(e)&&t.use(e),t},U=W,J=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:U).toRefract(e)};var H=s(49320),_=s(25868);const G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U;if((0,_.c)(e))try{return t.fromRefract(JSON.parse(e))}catch{}return(0,M.c)(e)&&(0,H.c)("element",e)?t.fromRefract(e):t.toElement(e)};var Q=s(69952),K=s(41008),X=s(42636),z=s(11204);const Y=class extends z{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 Z 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=Z;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 n=e[t];if(null!=n){if(!s&&"function"===typeof n)return n;const e=s?n.leave:n.enter;if("function"===typeof e)return e}else{const n=s?e.leave:e.enter;if(null!=n){if("function"===typeof n)return n;const e=n[t];if("function"===typeof e)return e}}return null},ne={},ie=e=>null===e||void 0===e?void 0:e.type,re=e=>"string"===typeof ie(e),oe=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),ce=function(e,t){let{keyMap:s=null,state:n={},breakSymbol:i=ne,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=se,nodeTypeGetter:a=ie,nodePredicate:l=re,nodeCloneFn:p=oe,detectCycles:u=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,m,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const x=[],E=[];do{v+=1;const e=v===f.length;let s;const j=e&&0!==b.length;if(e){if(s=0===E.length?void 0:x.pop(),y=m,m=E.pop(),j)if(g){y=y.slice();let e=0;for(const[t,s]of b){const n=t-e;s===r?(y.splice(n,1),e+=1):y[n]=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(m!==r&&void 0!==m){if(s=g?v:f[v],y=m[s],y===r||void 0===y)continue;x.push(s)}let S;if(!Array.isArray(y)){if(!l(y))throw new te("Invalid AST Node: ".concat(String(y)),{node:y});if(u&&E.includes(y)){x.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(n))t[e]=s;S=r.call(t,y,s,m,x,E)}if(S===i)break;if(S===o){if(!e){x.pop();continue}}else if(void 0!==S&&(b.push([s,S]),!e)){if(!l(S)){x.pop();continue}y=S}}var w;if(void 0===S&&j&&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=[],m!==r&&void 0!==m&&E.push(m),m=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:n={},breakSymbol:i=ne,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=se,nodeTypeGetter:a=ie,nodePredicate:l=re,nodeCloneFn:p=oe,detectCycles:u=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,m,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const x=[],E=[];do{v+=1;const e=v===f.length;let s;const j=e&&0!==b.length;if(e){if(s=0===E.length?void 0:x.pop(),y=m,m=E.pop(),j)if(g){y=y.slice();let e=0;for(const[t,s]of b){const n=t-e;s===r?(y.splice(n,1),e+=1):y[n]=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(m!==r&&void 0!==m){if(s=g?v:f[v],y=m[s],y===r||void 0===y)continue;x.push(s)}let S;if(!Array.isArray(y)){if(!l(y))throw new te("Invalid AST Node: ".concat(String(y)),{node:y});if(u&&E.includes(y)){x.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(n))t[e]=s;S=await r.call(t,y,s,m,x,E)}if(S===i)break;if(S===o){if(!e){x.pop();continue}}else if(void 0!==S&&(b.push([s,S]),!e)){if(!l(S)){x.pop();continue}y=S}}var w;if(void 0===S&&j&&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=[],m!==r&&void 0!==m&&E.push(m),m=y}while(void 0!==d);return 0!==b.length?b[b.length-1][1]:e};var ae=s(88796),le=s(87152);const pe=(e,t)=>"object"===typeof t&&null!==t&&e in t&&"function"===typeof t[e],ue=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 B.uQ)&&t.classes.includes(e),me=(e,t)=>"object"===typeof t&&null!==t&&"element"in t&&t.element===e,ge=e=>e({hasMethod:pe,hasBasicElementProps:ue,primitiveEq:he,isElementType:me,hasClass:de}),fe=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof B.gr||t(e)&&s(void 0,e)})),ve=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof B.M$||t(e)&&s("string",e)})),be=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof B.wH||t(e)&&s("number",e)})),ye=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof B.WM||t(e)&&s("null",e)})),xe=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof B.Ar||t(e)&&s("boolean",e)})),Ee=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:n}=e;return e=>e instanceof B.We||t(e)&&s("object",e)&&n("keys",e)&&n("values",e)&&n("items",e)})),we=ge((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:n}=e;return e=>e instanceof B.uQ&&!(e instanceof B.We)||t(e)&&s("array",e)&&n("push",e)&&n("unshift",e)&&n("map",e)&&n("reduce",e)})),je=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof B.u6||t(e)&&s("member",e)&&n(void 0,e)})),Se=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof B.UH||t(e)&&s("link",e)&&n(void 0,e)})),Pe=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof B.eE||t(e)&&s("ref",e)&&n(void 0,e)})),$e=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof T||t(e)&&s("annotation",e)&&n("array",e)})),Oe=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof k||t(e)&&s("comment",e)&&n("string",e)})),qe=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof I||t(e)&&s("parseResult",e)&&n("array",e)})),Be=ge((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof N||t(e)&&s("sourceMap",e)&&n("array",e)})),Me=e=>me("object",e)||me("array",e)||me("boolean",e)||me("number",e)||me("string",e)||me("null",e)||me("member",e),Re=e=>Be(e.meta.get("sourceMap")),Te=(e,t)=>{if(0===e.length)return!0;const s=t.attributes.get("symbols");return!!we(s)&&(0,ae.c)((0,le.c)(s.toValue()),e)},Ae=(e,t)=>0===e.length||(0,ae.c)((0,le.c)(t.classes.toValue()),e);const ke=class extends te{constructor(e,t){super(e,t),(0,Q.c)(this,"value",void 0),"undefined"!==typeof t&&(this.value=t.value)}};const Fe=class extends ke{};const Ce=class extends ke{},Ie=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);if(e instanceof B.KeyValuePair){const{key:t,value:i}=e,r=fe(t)?Ie(t,n):t,o=fe(i)?Ie(i,n):i,c=new B.KeyValuePair(r,o);return s.set(e,c),c}if(e instanceof B.wL){const t=e=>Ie(e,n),i=[...e].map(t),r=new B.wL(i);return s.set(e,r),r}if(e instanceof B.eW){const t=e=>Ie(e,n),i=[...e].map(t),r=new B.eW(i);return s.set(e,r),r}if(fe(e)){const t=Ve(e);if(s.set(e,t),e.content)if(fe(e.content))t.content=Ie(e.content,n);else if(e.content instanceof B.KeyValuePair)t.content=Ie(e.content,n);else if(Array.isArray(e.content)){const s=e=>Ie(e,n);t.content=e.content.map(s)}else t.content=e.content;else t.content=e.content;return t}throw new Fe("Value provided to cloneDeep function couldn't be cloned",{value:e})};Ie.safe=e=>{try{return Ie(e)}catch{return e}};const De=e=>{const{key:t,value:s}=e;return new B.KeyValuePair(t,s)},Ne=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=Ie(e.meta)),e.attributes.length>0&&(t._attributes=Ie(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 B.KeyValuePair?t.content=De(e.content):t.content=e.content;return t},Ve=e=>{if(e instanceof B.KeyValuePair)return De(e);if(e instanceof B.wL)return(e=>{const t=[...e];return new B.wL(t)})(e);if(e instanceof B.eW)return(e=>{const t=[...e];return new B.eW(t)})(e);if(fe(e))return Ne(e);throw new Ce("Value provided to cloneShallow function couldn't be cloned",{value:e})};Ve.safe=e=>{try{return Ve(e)}catch{return e}};const We=e=>Ee(e)?"ObjectElement":we(e)?"ArrayElement":je(e)?"MemberElement":ve(e)?"StringElement":xe(e)?"BooleanElement":be(e)?"NumberElement":ye(e)?"NullElement":Se(e)?"LinkElement":Pe(e)?"RefElement":void 0,Le=e=>fe(e)?Ve(e):oe(e),Ue=(0,K.c)(We,_.c),Je={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=X.c,returnOnTrue:t,returnOnFalse:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,Q.c)(this,"result",void 0),(0,Q.c)(this,"predicate",void 0),(0,Q.c)(this,"returnOnTrue",void 0),(0,Q.c)(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=Je,...n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ce(e,t,{keyMap:s,nodeTypeGetter:We,nodePredicate:Ue,nodeCloneFn:Le,...n})};_e[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=Je,...n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ce[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:s,nodeTypeGetter:We,nodePredicate:Ue,nodeCloneFn:Le,...n})};class Ge{constructor(){(0,Q.c)(this,"result",""),(0,Q.c)(this,"nestingLevel",0)}enter(e){const{element:t}=e,s=t.charAt(0).toUpperCase()+t.slice(1),n=" ".repeat(this.nestingLevel);this.result+=this.nestingLevel>0?"\n":"",this.result+="".concat(n,"(").concat(s,"Element"),this.nestingLevel+=1}leave(){this.nestingLevel-=1,this.result+=")"}}const Qe=e=>{const t=new Ge;return _e(e,t),t.result};var Ke=s(30600);const Xe=e=>"string"===typeof(null===e||void 0===e?void 0:e.type)?e.type:We(e),ze={EphemeralObject:["content"],EphemeralArray:["content"],...Je},Ye=function(e,t){let{keyMap:s=ze,...n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _e(e,t,{keyMap:s,nodeTypeGetter:Xe,nodePredicate:Ke.c,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n})};Ye[Symbol.for("nodejs.util.promisify.custom")]=async function(e){let{keyMap:t=ze,...s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _e[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:Xe,nodePredicate:Ke.c,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...s})};const Ze=class{constructor(e){(0,Q.c)(this,"type","EphemeralArray"),(0,Q.c)(this,"content",[]),(0,Q.c)(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,Q.c)(this,"type","EphemeralObject"),(0,Q.c)(this,"content",[]),(0,Q.c)(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,Q.c)(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,Q.c)(this,"EphemeralObject",{leave:e=>e.toObject()}),(0,Q.c)(this,"MemberElement",{enter:e=>[e.key,e.value]}),(0,Q.c)(this,"ArrayElement",{enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new Ze(e.content);return this.references.set(e,t),t}}),(0,Q.c)(this,"EphemeralArray",{leave:e=>e.toArray()}),(0,Q.c)(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)||xe(e)||ye(e)?e.toValue():Ye(e,new tt):e;var nt=s(13652),it=s(11792),rt=s(74884);const ot=class extends ee{};const ct=class extends ot{};const at=class extends Array{constructor(){super(...arguments),(0,Q.c)(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,Q.c)(this,"source",void 0),(0,Q.c)(this,"parserOptions",void 0),"undefined"!==typeof t&&(this.source=t.source,this.parserOptions=t.parserOptions)}};const pt=class{constructor(){(0,Q.c)(this,"adapters",[])}async detectAdapterCandidates(e){const t=[];for(const s of this.adapters)(0,it.c)(s.detect)&&await s.detect(e)&&t.push(s);return t}async findAdapter(e,t){if((0,_.c)(t))return this.adapters.find((e=>!!(0,rt.c)(e.mediaTypes)&&e.mediaTypes.includes(t)));const s=await this.detectAdapterCandidates(e);return(0,nt.c)(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,n=e.match(s);if(null===n)return(new at).unknownMediaType;const{groups:i}=n,r=(null===i||void 0===i?void 0:i.version)||(null===i||void 0===i?void 0:i.version_json)||(null===i||void 0===i?void 0:i.version_yaml),o=null!==i&&void 0!==i&&i.version_json?"json":null!==i&&void 0!==i&&i.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(n){throw new lt("Encountered an unexpected error while matching parser adapters against the source.",{source:e,parserOptions:s,cause:n})}if((0,F.c)(t))throw new lt("Source did not match any registered parsers",{source:e,parserOptions:s});try{return t.parse(e,s)}catch(n){throw new lt("Parsing encountered an unexpected error.",{source:e,parserOptions:s,cause:n})}}};var ut=s(26536),ht=s(72764);const dt=globalThis.fetch;(0,it.c)(dt)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===ft&&null===vt)vt=mt.init().then((()=>mt.Language.load(gt))).then((e=>{const t=new mt;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(44552),xt=s(70664),Et=s(7282);const wt=()=>({predicates:{...n},namespace:U}),jt={toolboxCreator:wt,visitorOptions:{nodeTypeGetter:We,exposeEdits:!0}},St=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===t.length)return e;const n=(0,yt.c)(jt,s),{toolboxCreator:i,visitorOptions:r}=n,o=i(),c=t.map((e=>e(o))),a=function(e){let{visitFnGetter:t=se,nodeTypeGetter:s=ie,breakSymbol:n=ne,deleteNodeSymbol:i=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,u=!1;for(var h=arguments.length,d=new Array(h>1?h-1:0),m=1;m1?o-1:0),p=1;p{let{Type:s,plugins:n=[]}=t;const i=new s(e);return St(i,n,{toolboxCreator:wt,visitorOptions:{nodeTypeGetter:We}})},$t=e=>function(t){return Pt(t,{...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Type:e})};B.We.refract=$t(B.We),B.uQ.refract=$t(B.uQ),B.M$.refract=$t(B.M$),B.Ar.refract=$t(B.Ar),B.WM.refract=$t(B.WM),B.wH.refract=$t(B.wH),B.UH.refract=$t(B.UH),B.eE.refract=$t(B.eE),T.refract=$t(T),k.refract=$t(k),I.refract=$t(I),N.refract=$t(N);const Ot=class{constructor(e){(0,Q.c)(this,"type",void 0),(0,Q.c)(this,"startPosition",void 0),(0,Q.c)(this,"endPosition",void 0),(0,Q.c)(this,"startIndex",void 0),(0,Q.c)(this,"endIndex",void 0),(0,Q.c)(this,"text",void 0),(0,Q.c)(this,"isNamed",void 0),(0,Q.c)(this,"isMissing",void 0),(0,Q.c)(this,"fieldName",void 0),(0,Q.c)(this,"hasError",!1),(0,Q.c)(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 qt{static toPosition(e){const t=new B.uQ([e.startPosition.row,e.startPosition.column,e.startIndex]),s=new B.uQ([e.endPosition.row,e.endPosition.column,e.endIndex]);return t.classes.push("position"),s.classes.push("position"),[t,s]}constructor(){(0,Q.c)(this,"sourceMap",!1),(0,Q.c)(this,"annotations",void 0),(0,Q.c)(this,"ParseResultElement",{leave:e=>{const t=e.findElements(Me);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 Ot&&!e.isNamed&&e.isMissing){const t=e.type||e.text,s="(Missing ".concat(t,")"),n=new T(s);n.classes.push("warning"),this.maybeAddSourceMap(e,n),this.annotations.push(n)}return null}document(e){const t=new I;return t._content=e.children,this.maybeAddSourceMap(e,t),t}object(e){const t=new B.We;return t._content=e.children,this.maybeAddSourceMap(e,t),t}array(e){const t=new B.uQ;return t._content=e.children,this.maybeAddSourceMap(e,t),t}pair(e){const t=new B.u6;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 B.M$(JSON.parse(e.text));return this.maybeAddSourceMap(e,t),t}number(e){const t=new B.wH(Number(e.text));return this.maybeAddSourceMap(e,t),t}null(e){const t=new B.WM;return this.maybeAddSourceMap(e,t),t}true(e){const t=new B.Ar(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new B.Ar(!1);return this.maybeAddSourceMap(e,t),t}ERROR(e,t,s,n){const i=!e.hasError,r=e.text,o=i?"(Unexpected ".concat(r,")"):"(Error ".concat(r,")"),c=new T(o);if(c.classes.push("error"),this.maybeAddSourceMap(e,c),0===n.length){const e=new I;return e.push(c),e}return this.annotations.push(c),null}maybeAddSourceMap(e,t){if(!this.sourceMap)return;const s=new N,n=qt.toPosition(e);if(null!==n){const[e,t]=n;s.push(e),s.push(t)}s.astNode=e,t.meta.set("sourceMap",s)}}const Bt=qt;let Mt;Mt=Symbol.iterator;class Rt{constructor(e){(0,Q.c)(this,"cursor",void 0),this.cursor=e}document(){return new Ot(this.cursor)}object(){return new Ot(this.cursor).setFieldName(this.cursor)}array(){return new Ot(this.cursor).setFieldName(this.cursor)}pair(){return new Ot(this.cursor)}string(){return new Ot(this.cursor).setFieldName(this.cursor)}number(){return new Ot(this.cursor).setFieldName(this.cursor)}null(){return new Ot(this.cursor).setFieldName(this.cursor)}true(){return new Ot(this.cursor).setFieldName(this.cursor)}false(){return new Ot(this.cursor).setFieldName(this.cursor)}ERROR(){return new Ot(this.cursor).setHasError(this.cursor)}*[Mt](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new Ot(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 Tt=Rt,At={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"],...Je},kt=e=>qe(e)?"ParseResultElement":fe(e)?We(e):ie(e),Ft=e=>fe(e)||re(e),Ct=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new Bt,n=e.walk(),i=new Tt(n),[r]=Array.from(i);return ce(r,s,{keyMap:At,nodeTypeGetter:kt,nodePredicate:Ft,state:{sourceMap:t}})};class It{constructor(){let{children:e=[],position:t,isMissing:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,Q.c)(this,"type","node"),(0,Q.c)(this,"isMissing",void 0),(0,Q.c)(this,"children",void 0),(0,Q.c)(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,Q.c)(It,"type","node");const Dt=It;const Nt=class extends Dt{};class Vt extends Nt{get child(){return(0,nt.c)(this.children)}}(0,Q.c)(Vt,"type","document");const Wt=Vt;class Lt extends Dt{get rootNode(){return(0,nt.c)(this.children)}}(0,Q.c)(Lt,"type","parseResult");const Ut=Lt;class Jt{constructor(e){let{row:t,column:s,char:n}=e;(0,Q.c)(this,"type",Jt.type),(0,Q.c)(this,"row",void 0),(0,Q.c)(this,"column",void 0),(0,Q.c)(this,"char",void 0),this.row=t,this.column=s,this.char=n}}(0,Q.c)(Jt,"type","point");class Ht{constructor(e){let{start:t,end:s}=e;(0,Q.c)(this,"type",Ht.type),(0,Q.c)(this,"start",void 0),(0,Q.c)(this,"end",void 0),this.start=t,this.end=s}}(0,Q.c)(Ht,"type","position");const _t=Ht;class Gt extends Dt{constructor(){let{value:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...t}),(0,Q.c)(this,"value",void 0),this.value=e}}(0,Q.c)(Gt,"type","literal");const Qt=Gt,Kt=(e,t)=>null!=t&&"object"===typeof t&&"type"in t&&t.type===e,Xt=e=>Kt("string",e),zt=e=>Kt("false",e),Yt=e=>Kt("true",e),Zt=e=>Kt("null",e),es=e=>Kt("number",e),ts=e=>Kt("array",e),ss=e=>Kt("object",e),ns=e=>Kt("property",e),is=e=>Kt("key",e);class rs extends Nt{get properties(){return this.children.filter(ns)}}(0,Q.c)(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=>Kt("stringContent",e))(e)||(e=>Kt("escapeSequence",e))(e))).reduce(((e,t)=>e+t.value),"")}}(0,Q.c)(cs,"type","string");const as=cs;class ls extends as{}(0,Q.c)(ls,"type","key");const ps=ls;class us extends Nt{get key(){return this.children.find(is)}get value(){return this.children.find((e=>zt(e)||Yt(e)||Zt(e)||es(e)||Xt(e)||ts(e)||ss(e)))}}(0,Q.c)(us,"type","property");const hs=us;class ds extends Nt{get items(){return this.children.filter((e=>zt(e)||Yt(e)||Zt(e)||es(e)||Xt(e)||ts(e)||ss))}}(0,Q.c)(ds,"type","array");const ms=ds;class gs extends Nt{constructor(e){let{value:t,...s}=e;super({...s}),(0,Q.c)(this,"value",void 0),this.value=t}}(0,Q.c)(gs,"type","value");const fs=gs;class vs extends fs{}(0,Q.c)(vs,"type","stringContent");const bs=vs;class ys extends fs{}(0,Q.c)(ys,"type","number");const xs=ys;class Es extends fs{}(0,Q.c)(Es,"type","null");const ws=Es;class js extends fs{}(0,Q.c)(js,"type","true");const Ss=js;class Ps extends fs{}(0,Q.c)(Ps,"type","false");const $s=Ps;class Os extends Dt{constructor(){let{value:e,isUnexpected:t=!1,...s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...s}),(0,Q.c)(this,"value",void 0),(0,Q.c)(this,"isUnexpected",void 0),this.value=e,this.isUnexpected=t}}(0,Q.c)(Os,"type","error");const qs=Os,Bs={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"]};class Ms{constructor(){(0,Q.c)(this,"document",{enter:e=>{const t=Ms.toPosition(e);return new Wt({children:e.children,position:t,isMissing:e.isMissing})},leave:e=>new Ut({children:[e]})})}static toPosition(e){const t=new Jt({row:e.startPosition.row,column:e.startPosition.column,char:e.startIndex}),s=new Jt({row:e.endPosition.row,column:e.endPosition.column,char:e.endIndex});return new _t({start:t,end:s})}enter(e){if(e instanceof Ot&&!e.isNamed){const t=Ms.toPosition(e),s=e.type||e.text,{isMissing:n}=e;return new Qt({value:s,position:t,isMissing:n})}}object(e){const t=Ms.toPosition(e);return new os({children:e.children,position:t,isMissing:e.isMissing})}pair(e){const t=Ms.toPosition(e),s=e.children.slice(1),{keyNode:n}=e,i=new ps({children:(null===n||void 0===n?void 0:n.children)||[],position:null!=n?Ms.toPosition(n):void 0,isMissing:null!=n&&n.isMissing});return new hs({children:[i,...s],position:t,isMissing:e.isMissing})}array(e){const t=Ms.toPosition(e);return new ms({children:e.children,position:t,isMissing:e.isMissing})}string(e){const t=Ms.toPosition(e),s=new bs({value:JSON.parse(e.text)});return new as({children:[s],position:t,isMissing:e.isMissing})}number(e){const t=Ms.toPosition(e),s=e.text;return new xs({value:s,position:t,isMissing:e.isMissing})}null(e){const t=Ms.toPosition(e),s=e.text;return new ws({value:s,position:t,isMissing:e.isMissing})}true(e){const t=Ms.toPosition(e),s=e.text;return new Ss({value:s,position:t,isMissing:e.isMissing})}false(e){const t=Ms.toPosition(e),s=e.text;return new $s({value:s,position:t,isMissing:e.isMissing})}ERROR(e,t,s,n){const i=Ms.toPosition(e),r=new qs({children:e.children,position:i,isUnexpected:!e.hasError,isMissing:e.isMissing,value:e.text});return 0===n.length?new Ut({children:[r]}):r}}const Rs=Ms,Ts={[Ut.type]:["children"],[Wt.type]:["children"],[os.type]:["children"],[hs.type]:["children"],[ms.type]:["children"],[qs.type]:["children"],...Je},As=e=>qe(e)?"ParseResultElement":fe(e)?We(e):ie(e),ks=e=>fe(e)||re(e);const Fs=class{constructor(){(0,Q.c)(this,"sourceMap",!1),(0,Q.c)(this,"annotations",void 0),(0,Q.c)(this,"ParseResultElement",{leave:e=>{const t=e.findElements(Me);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 I;return t._content=e.children,t}object(e){const t=new B.We;return t._content=e.children,this.maybeAddSourceMap(e,t),t}property(e){const t=new B.u6;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 B.M$(e.value);return this.maybeAddSourceMap(e,t),t}array(e){const t=new B.uQ;return t._content=e.children,this.maybeAddSourceMap(e,t),t}string(e){const t=new B.M$(e.value);return this.maybeAddSourceMap(e,t),t}number(e){const t=new B.wH(Number(e.value));return this.maybeAddSourceMap(e,t),t}null(e){const t=new B.WM;return this.maybeAddSourceMap(e,t),t}true(e){const t=new B.Ar(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new B.Ar(!1);return this.maybeAddSourceMap(e,t),t}literal(e){if(e.isMissing){const t="(Missing ".concat(e.value,")"),s=new T(t);s.classes.push("warning"),this.maybeAddSourceMap(e,s),this.annotations.push(s)}return null}error(e,t,s,n){const i=e.isUnexpected?"(Unexpected ".concat(e.value,")"):"(Error ".concat(e.value,")"),r=new T(i);if(r.classes.push("error"),this.maybeAddSourceMap(e,r),0===n.length){const e=new I;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)}},Cs=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=e.walk(),n=new Tt(s),[i]=Array.from(n),r=new Rs,o=new Fs,c=ce(i,r,{keyMap:Bs,state:{sourceMap:t}});return ce(c.rootNode,o,{keyMap:Ts,nodeTypeGetter:As,nodePredicate:ks,state:{sourceMap:t}})},Is=L(),Ds=/(?^\s*true\s*$)|(?^\s*false\s*$)|(?^\s*null\s*$)|(?^\s*\d+\s*$)|(?