diff --git a/asset-manifest.json b/asset-manifest.json
index ed42ffdb0b..4bb62b250d 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,22 +1,22 @@
{
"files": {
"main.css": "/apidom/static/css/main.e6c13ad2.css",
- "main.js": "/apidom/static/js/main.bd85f774.js",
- "static/js/506.aa285609.chunk.js": "/apidom/static/js/506.aa285609.chunk.js",
+ "main.js": "/apidom/static/js/main.11ced1c3.js",
+ "static/js/506.63361183.chunk.js": "/apidom/static/js/506.63361183.chunk.js",
"static/js/878.f7f3c6fe.chunk.js": "/apidom/static/js/878.f7f3c6fe.chunk.js",
- "static/js/940.9bba9b23.chunk.js": "/apidom/static/js/940.9bba9b23.chunk.js",
+ "static/js/940.c8221071.chunk.js": "/apidom/static/js/940.c8221071.chunk.js",
"static/media/tree-sitter-yaml.wasm": "/apidom/static/media/tree-sitter-yaml.d396281e11774e0afa7a.wasm",
"static/media/tree-sitter.wasm": "/apidom/static/media/tree-sitter.23aac571c96605dc2521.wasm",
"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.bd85f774.js.map": "/apidom/static/js/main.bd85f774.js.map",
- "506.aa285609.chunk.js.map": "/apidom/static/js/506.aa285609.chunk.js.map",
+ "main.11ced1c3.js.map": "/apidom/static/js/main.11ced1c3.js.map",
+ "506.63361183.chunk.js.map": "/apidom/static/js/506.63361183.chunk.js.map",
"878.f7f3c6fe.chunk.js.map": "/apidom/static/js/878.f7f3c6fe.chunk.js.map",
- "940.9bba9b23.chunk.js.map": "/apidom/static/js/940.9bba9b23.chunk.js.map"
+ "940.c8221071.chunk.js.map": "/apidom/static/js/940.c8221071.chunk.js.map"
},
"entrypoints": [
"static/css/main.e6c13ad2.css",
- "static/js/main.bd85f774.js"
+ "static/js/main.11ced1c3.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 8f8f19a0c7..9646f77dd6 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/506.aa285609.chunk.js b/static/js/506.63361183.chunk.js
similarity index 99%
rename from static/js/506.aa285609.chunk.js
rename to static/js/506.63361183.chunk.js
index 125b51b9ea..a48a4cae85 100644
--- a/static/js/506.aa285609.chunk.js
+++ b/static/js/506.63361183.chunk.js
@@ -1,2 +1,2 @@
-(()=>{var e={79795:(e,t,s)=>{"use strict";var n={};s.r(n),s.d(n,{hasElementSourceMap:()=>qe,includesClasses:()=>Te,includesSymbols:()=>Ce,isAnnotationElement:()=>Pe,isArrayElement:()=>we,isBooleanElement:()=>xe,isCommentElement:()=>$e,isElement:()=>ge,isLinkElement:()=>je,isMemberElement:()=>Se,isNullElement:()=>be,isNumberElement:()=>ye,isObjectElement:()=>Ee,isParseResultElement:()=>Oe,isPrimitiveElement:()=>Me,isRefElement:()=>Ae,isSourceMapElement:()=>Be,isStringElement:()=>ve});var i={};s.r(i),s.d(i,{detect:()=>Ds,detectionRegExp:()=>Is,lexicalAnalysis:()=>yt,mediaTypes:()=>_s,namespace:()=>ks,parse:()=>Ns,syntacticAnalysis:()=>Ft,syntacticAnalysisDirect:()=>Ft,syntacticAnalysisIndirect:()=>Fs});var r={};s.r(r),s.d(r,{detect:()=>Di,lexicalAnalysis:()=>Hs,mediaTypes:()=>_i,namespace:()=>Ii,parse:()=>Ni,syntacticAnalysis:()=>ki});var o={};s.r(o),s.d(o,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>So,isLinkDescriptionElement:()=>Po,isMediaElement:()=>Ao});var c={};s.r(c),s.d(c,{isReferenceLikeElement:()=>mc,isSwaggerExtension:()=>dc});var a={};s.r(a),s.d(a,{isContactElement:()=>Yc,isDefinitionsElement:()=>fa,isExampleElement:()=>ca,isExternalDocumentationElement:()=>ta,isHeaderElement:()=>aa,isHeadersElement:()=>oa,isInfoElement:()=>Xc,isItemsElement:()=>na,isLicenseElement:()=>zc,isOperationElement:()=>ea,isParameterElement:()=>sa,isParametersDefinitionsElement:()=>ga,isPathItemElement:()=>Zc,isPathsElement:()=>Qc,isReferenceElement:()=>ua,isResponseElement:()=>ra,isResponsesDefinitionsElement:()=>da,isResponsesElement:()=>ia,isSchemaElement:()=>ha,isScopesElement:()=>ya,isSecurityDefinitionsElement:()=>ma,isSecurityRequirementElement:()=>ba,isSecuritySchemeElement:()=>va,isSwaggerElement:()=>Gc,isSwaggerVersionElement:()=>Kc,isTagElement:()=>la,isXmlElement:()=>pa});var l={};s.r(l),s.d(l,{detect:()=>du,detectionRegExp:()=>pu,mediaTypes:()=>hu,namespace:()=>fu,parse:()=>mu});var u={};s.r(u),s.d(u,{detect:()=>yu,detectionRegExp:()=>vu,mediaTypes:()=>gu,namespace:()=>xu,parse:()=>bu});var h={};s.r(h),s.d(h,{isBooleanJsonSchemaElement:()=>Np,isCallbackElement:()=>xp,isComponentsElement:()=>Ep,isContactElement:()=>wp,isExampleElement:()=>Sp,isExternalDocumentationElement:()=>jp,isHeaderElement:()=>Ap,isInfoElement:()=>Pp,isLicenseElement:()=>$p,isLinkElement:()=>Op,isMediaTypeElement:()=>Hp,isOpenApi3_0Element:()=>Mp,isOpenapiElement:()=>Bp,isOperationElement:()=>qp,isParameterElement:()=>Cp,isPathItemElement:()=>Tp,isPathsElement:()=>Rp,isReferenceElement:()=>Fp,isRequestBodyElement:()=>kp,isResponseElement:()=>Ip,isResponsesElement:()=>_p,isSchemaElement:()=>Dp,isSecurityRequirementElement:()=>Vp,isSecuritySchemeElement:()=>Lp,isServerElement:()=>Jp,isServerVariableElement:()=>Up,isServersElement:()=>Wp});var p={};s.r(p),s.d(p,{detect:()=>Rg,detectionRegExp:()=>Tg,mediaTypes:()=>Cg,namespace:()=>kg,parse:()=>Fg});var d={};s.r(d),s.d(d,{detect:()=>Dg,detectionRegExp:()=>_g,mediaTypes:()=>Ig,namespace:()=>Vg,parse:()=>Ng});var m={};s.r(m),s.d(m,{isBooleanJsonSchemaElement:()=>jy,isCallbackElement:()=>ty,isComponentsElement:()=>sy,isContactElement:()=>ny,isExampleElement:()=>iy,isExternalDocumentationElement:()=>ry,isHeaderElement:()=>oy,isInfoElement:()=>cy,isJsonSchemaDialectElement:()=>ay,isLicenseElement:()=>ly,isLinkElement:()=>uy,isMediaTypeElement:()=>By,isOpenApi3_1Element:()=>py,isOpenapiElement:()=>hy,isOperationElement:()=>dy,isParameterElement:()=>my,isPathItemElement:()=>fy,isPathItemElementExternal:()=>gy,isPathsElement:()=>vy,isReferenceElement:()=>yy,isReferenceElementExternal:()=>by,isRequestBodyElement:()=>xy,isResponseElement:()=>Ey,isResponsesElement:()=>wy,isSchemaElement:()=>Sy,isSecurityRequirementElement:()=>Ay,isSecuritySchemeElement:()=>Py,isServerElement:()=>$y,isServerVariableElement:()=>Oy});var f={};s.r(f),s.d(f,{detect:()=>ix,detectionRegExp:()=>nx,mediaTypes:()=>sx,namespace:()=>ox,parse:()=>rx});var g={};s.r(g),s.d(g,{detect:()=>lx,detectionRegExp:()=>ax,mediaTypes:()=>cx,namespace:()=>hx,parse:()=>ux});var v={};s.r(v),s.d(v,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>Px,isLinkDescriptionElement:()=>$x,isMediaElement:()=>Ao});var y={};s.r(y),s.d(y,{isJSONReferenceElement:()=>jo,isJSONSchemaElement:()=>rw,isLinkDescriptionElement:()=>ow});var b={};s.r(b),s.d(b,{isAsyncApi2Element:()=>xw,isAsyncApiVersionElement:()=>Ew,isBooleanJsonSchemaElement:()=>Fw,isChannelBindingsElement:()=>ww,isChannelItemElement:()=>Sw,isChannelsElement:()=>jw,isComponentsElement:()=>Aw,isContactElement:()=>Pw,isIdentifierElement:()=>$w,isInfoElement:()=>Ow,isLicenseElement:()=>Bw,isOperationElement:()=>Mw,isParameterElement:()=>qw,isParametersElement:()=>Cw,isReferenceElement:()=>Tw,isSchemaElement:()=>Rw,isSecurityRequirementElement:()=>kw,isServerBindingsElement:()=>_w,isServerElement:()=>Iw,isServerVariableElement:()=>Nw,isServersElement:()=>Dw});var x={};s.r(x),s.d(x,{detect:()=>BC,detectionRegExp:()=>OC,mediaTypes:()=>$C,namespace:()=>qC,parse:()=>MC});var E={};s.r(E),s.d(E,{detect:()=>RC,detectionRegExp:()=>TC,mediaTypes:()=>CC,namespace:()=>kC,parse:()=>FC});var w={};s.r(w),s.d(w,{isReferenceLikeElement:()=>pT,isWorkflowsSpecificationExtension:()=>hT});var S={};s.r(S),s.d(S,{isComponentsElement:()=>jR,isCriterionElement:()=>AR,isFailureActionCriteriaElement:()=>BR,isFailureActionElement:()=>OR,isInfoElement:()=>aR,isJSONSchemaElement:()=>MR,isParameterElement:()=>wR,isReferenceElement:()=>PR,isSourceDescriptionElement:()=>lR,isSourceDescriptionsElement:()=>uR,isStepDependsOnElement:()=>xR,isStepElement:()=>yR,isStepOnFailureElement:()=>gR,isStepOnSuccessElement:()=>fR,isStepOutputsElement:()=>vR,isStepParametersElement:()=>bR,isStepSuccessCriteriaElement:()=>ER,isSuccessActionCriteriaElement:()=>$R,isSuccessActionElement:()=>SR,isWorkflowElement:()=>mR,isWorkflowOutputsElement:()=>dR,isWorkflowStepsElement:()=>pR,isWorkflowsElement:()=>hR,isWorkflowsSpecElement:()=>oR,isWorkflowsSpecification1Element:()=>cR});var j={};s.r(j),s.d(j,{detect:()=>qF,detectionRegExp:()=>MF,mediaTypes:()=>BF,namespace:()=>TF,parse:()=>CF});var A={};s.r(A),s.d(A,{detect:()=>kF,detectionRegExp:()=>FF,mediaTypes:()=>RF,namespace:()=>_F,parse:()=>IF});var P={};s.r(P),s.d(P,{isInfoElement:()=>fI,isMainElement:()=>mI,isPrincipleElement:()=>gI,isRequirementElement:()=>vI,isRequirementLevelElement:()=>yI,isScenarioElement:()=>bI,isStandardElement:()=>xI,isStandardIdentifierElement:()=>EI});var $=s(65959),O=s(85618),B=s(32457);class M extends O.Om{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=M;class C extends O.Om{constructor(e,t,s){super(e,t,s),this.element="comment"}}const T=C;var R=s(84335);class F extends O.wE{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,R.A)(t))return!1;const s=this.content.findIndex((e=>e===t));return-1!==s&&(this.content[s]=e,!0)}}const k=F;class I extends O.wE{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 O.wE([e.start.row,e.start.column,e.start.char]),s=new O.wE([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),s.classes.push("position"),this.push(t).push(s)}}const _=I;class D extends O.g${constructor(){super(),this.register("annotation",q),this.register("comment",T),this.register("parseResult",k),this.register("sourceMap",_)}}const N=new D,V=e=>{const t=new D;return(0,B.A)(e)&&t.use(e),t},L=N,J=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:L).toRefract(e)};var U=s(52315),H=s(98806);const W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;if((0,H.A)(e))try{return t.fromRefract(JSON.parse(e))}catch{}return(0,B.A)(e)&&(0,U.A)("element",e)?t.fromRefract(e):t.toElement(e)};var G=s(98158),K=s(41870),X=s(58009),z=s(21212);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 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 Z=Q;const ee=class extends Z{constructor(e,t){if(super(e,t),null!=t&&"object"===typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}},te=(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},se={},ne=e=>null===e||void 0===e?void 0:e.type,ie=e=>"string"===typeof ne(e),re=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),oe=function(e){let{visitFnGetter:t=te,nodeTypeGetter:s=ne,breakSymbol:n=se,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,u,h,p,d,m){let f=l,g=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),f=e}};for(let y=0;y1&&void 0!==arguments[1]?arguments[1]:{};const c=Symbol("skip"),a=new Array(e.length).fill(c);return{async enter(l,u,h,p,d,m){let f=l,g=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),f=e}};for(let y=0;y2&&void 0!==arguments[2]?arguments[2]:{};const p=s||{};let d,m,f=Array.isArray(e),g=[e],v=-1,y=[],b=e;const x=[],E=[];do{v+=1;const e=v===g.length;let s;const j=e&&0!==y.length;if(e){if(s=0===E.length?void 0:x.pop(),b=m,m=E.pop(),j)if(f){b=b.slice();let e=0;for(const[t,s]of y){const n=t-e;s===r?(b.splice(n,1),e+=1):b[n]=s}}else{b=u(b);for(const[e,t]of y)b[e]=t}v=d.index,g=d.keys,y=d.edits,f=d.inArray,d=d.prev}else if(m!==r&&void 0!==m){if(s=f?v:g[v],b=m[s],b===r||void 0===b)continue;x.push(s)}let A;if(!Array.isArray(b)){var w;if(!l(b))throw new ee("Invalid AST Node: ".concat(String(b)),{node:b});if(h&&E.includes(b)){x.pop();continue}const r=c(t,a(b),e);if(r){for(const[e,s]of Object.entries(n))t[e]=s;const i={replaceWith(t,n){"function"===typeof n?n(t,b,s,m,x,E):m&&(m[s]=t),e||(b=t)}};A=r.call(t,b,s,m,x,E,i)}if("function"===typeof(null===(w=A)||void 0===w?void 0:w.then))throw new ee("Async visitor not supported in sync mode",{visitor:t,visitFn:r});if(A===i)break;if(A===o){if(!e){x.pop();continue}}else if(void 0!==A&&(y.push([s,A]),!e)){if(!l(A)){x.pop();continue}b=A}}var S;if(void 0===A&&j&&y.push([s,b]),!e)d={inArray:f,index:v,keys:g,edits:y,prev:d},f=Array.isArray(b),g=f?b:null!==(S=p[a(b)])&&void 0!==S?S:[],v=-1,y=[],m!==r&&void 0!==m&&E.push(m),m=b}while(void 0!==d);return 0!==y.length?y[y.length-1][1]:e};ce[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=null,state:n={},breakSymbol:i=se,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=te,nodeTypeGetter:a=ne,nodePredicate:l=ie,nodeCloneFn:u=re,detectCycles:h=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const p=s||{};let d,m,f=Array.isArray(e),g=[e],v=-1,y=[],b=e;const x=[],E=[];do{v+=1;const e=v===g.length;let s;const S=e&&0!==y.length;if(e){if(s=0===E.length?void 0:x.pop(),b=m,m=E.pop(),S)if(f){b=b.slice();let e=0;for(const[t,s]of y){const n=t-e;s===r?(b.splice(n,1),e+=1):b[n]=s}}else{b=u(b);for(const[e,t]of y)b[e]=t}v=d.index,g=d.keys,y=d.edits,f=d.inArray,d=d.prev}else if(m!==r&&void 0!==m){if(s=f?v:g[v],b=m[s],b===r||void 0===b)continue;x.push(s)}let j;if(!Array.isArray(b)){if(!l(b))throw new ee("Invalid AST Node: ".concat(String(b)),{node:b});if(h&&E.includes(b)){x.pop();continue}const r=c(t,a(b),e);if(r){for(const[e,s]of Object.entries(n))t[e]=s;const i={replaceWith(t,n){"function"===typeof n?n(t,b,s,m,x,E):m&&(m[s]=t),e||(b=t)}};j=await r.call(t,b,s,m,x,E,i)}if(j===i)break;if(j===o){if(!e){x.pop();continue}}else if(void 0!==j&&(y.push([s,j]),!e)){if(!l(j)){x.pop();continue}b=j}}var w;if(void 0===j&&S&&y.push([s,b]),!e)d={inArray:f,index:v,keys:g,edits:y,prev:d},f=Array.isArray(b),g=f?b:null!==(w=p[a(b)])&&void 0!==w?w:[],v=-1,y=[],m!==r&&void 0!==m&&E.push(m),m=b}while(void 0!==d);return 0!==y.length?y[y.length-1][1]:e};var ae=s(25384),le=s(80642);const ue=(e,t)=>"object"===typeof t&&null!==t&&e in t&&"function"===typeof t[e],he=e=>"object"===typeof e&&null!=e&&"_storedElement"in e&&"string"===typeof e._storedElement&&"_content"in e,pe=(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 O.wE)&&t.classes.includes(e),me=(e,t)=>"object"===typeof t&&null!==t&&"element"in t&&t.element===e,fe=e=>e({hasMethod:ue,hasBasicElementProps:he,primitiveEq:pe,isElementType:me,hasClass:de}),ge=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof O.Hg||t(e)&&s(void 0,e)})),ve=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof O.Om||t(e)&&s("string",e)})),ye=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof O.kT||t(e)&&s("number",e)})),be=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof O.Os||t(e)&&s("null",e)})),xe=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof O.bd||t(e)&&s("boolean",e)})),Ee=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:n}=e;return e=>e instanceof O.Sh||t(e)&&s("object",e)&&n("keys",e)&&n("values",e)&&n("items",e)})),we=fe((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:n}=e;return e=>e instanceof O.wE&&!(e instanceof O.Sh)||t(e)&&s("array",e)&&n("push",e)&&n("unshift",e)&&n("map",e)&&n("reduce",e)})),Se=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof O.Pr||t(e)&&s("member",e)&&n(void 0,e)})),je=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof O.Ft||t(e)&&s("link",e)&&n(void 0,e)})),Ae=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof O.sI||t(e)&&s("ref",e)&&n(void 0,e)})),Pe=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof q||t(e)&&s("annotation",e)&&n("array",e)})),$e=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof T||t(e)&&s("comment",e)&&n("string",e)})),Oe=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof k||t(e)&&s("parseResult",e)&&n("array",e)})),Be=fe((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:n}=e;return e=>e instanceof _||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),qe=e=>Be(e.meta.get("sourceMap")),Ce=(e,t)=>{if(0===e.length)return!0;const s=t.attributes.get("symbols");return!!we(s)&&(0,ae.A)((0,le.A)(s.toValue()),e)},Te=(e,t)=>0===e.length||(0,ae.A)((0,le.A)(t.classes.toValue()),e);const Re=class extends ee{constructor(e,t){super(e,t),(0,G.A)(this,"value",void 0),"undefined"!==typeof t&&(this.value=t.value)}};const Fe=class extends Re{};const ke=class extends Re{},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 O.KeyValuePair){const{key:t,value:i}=e,r=ge(t)?Ie(t,n):t,o=ge(i)?Ie(i,n):i,c=new O.KeyValuePair(r,o);return s.set(e,c),c}if(e instanceof O.ot){const t=e=>Ie(e,n),i=[...e].map(t),r=new O.ot(i);return s.set(e,r),r}if(e instanceof O.G6){const t=e=>Ie(e,n),i=[...e].map(t),r=new O.G6(i);return s.set(e,r),r}if(ge(e)){const t=Ne(e);if(s.set(e,t),e.content)if(ge(e.content))t.content=Ie(e.content,n);else if(e.content instanceof O.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 _e=e=>{const{key:t,value:s}=e;return new O.KeyValuePair(t,s)},De=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)),ge(e.content)){const s=e.content;t.content=De(s)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof O.KeyValuePair?t.content=_e(e.content):t.content=e.content;return t},Ne=e=>{if(e instanceof O.KeyValuePair)return _e(e);if(e instanceof O.ot)return(e=>{const t=[...e];return new O.ot(t)})(e);if(e instanceof O.G6)return(e=>{const t=[...e];return new O.G6(t)})(e);if(ge(e))return De(e);throw new ke("Value provided to cloneShallow function couldn't be cloned",{value:e})};Ne.safe=e=>{try{return Ne(e)}catch{return e}};const Ve=e=>Ee(e)?"ObjectElement":we(e)?"ArrayElement":Se(e)?"MemberElement":ve(e)?"StringElement":xe(e)?"BooleanElement":ye(e)?"NumberElement":be(e)?"NullElement":je(e)?"LinkElement":Ae(e)?"RefElement":void 0,Le=e=>ge(e)?Ne(e):re(e),Je=(0,K.A)(Ve,H.A),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=X.A,returnOnTrue:t,returnOnFalse:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,G.A)(this,"result",void 0),(0,G.A)(this,"predicate",void 0),(0,G.A)(this,"returnOnTrue",void 0),(0,G.A)(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 We=function(e,t){let{keyMap:s=Ue,...n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ce(e,t,{keyMap:s,nodeTypeGetter:Ve,nodePredicate:Je,nodeCloneFn:Le,...n})};We[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=Ue,...n}=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,...n})};class Ge{constructor(){(0,G.A)(this,"result",""),(0,G.A)(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 Ke=e=>{const t=new Ge;return We(e,t),t.result};var Xe=s(34887);const ze=e=>"string"===typeof(null===e||void 0===e?void 0:e.type)?e.type:Ve(e),Ye={EphemeralObject:["content"],EphemeralArray:["content"],...Ue},Qe=function(e,t){let{keyMap:s=Ye,...n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return We(e,t,{keyMap:s,nodeTypeGetter:ze,nodePredicate:Xe.A,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n})};Qe[Symbol.for("nodejs.util.promisify.custom")]=async function(e){let{keyMap:t=Ye,...s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return We[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:ze,nodePredicate:Xe.A,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...s})};const Ze=class{constructor(e){(0,G.A)(this,"type","EphemeralArray"),(0,G.A)(this,"content",[]),(0,G.A)(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,G.A)(this,"type","EphemeralObject"),(0,G.A)(this,"content",[]),(0,G.A)(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,G.A)(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,G.A)(this,"EphemeralObject",{leave:e=>e.toObject()}),(0,G.A)(this,"MemberElement",{enter:e=>[e.key,e.value]}),(0,G.A)(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,G.A)(this,"EphemeralArray",{leave:e=>e.toArray()}),(0,G.A)(this,"references",new WeakMap)}BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e){var t;const s=arguments.length<=4?void 0:arguments[4];return"EphemeralObject"===(null===(t=s[s.length-1])||void 0===t?void 0:t.type)?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return ve(e.href)?e.href.toValue():""}}const st=e=>ge(e)?ve(e)||ye(e)||xe(e)||be(e)?e.toValue():Qe(e,new tt):e;var nt=s(13225),it=s(74442),rt=s(83346);const ot=class extends Z{};const ct=class extends ot{};const at=class extends Array{constructor(){super(...arguments),(0,G.A)(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 ee{constructor(e,t){super(e,t),(0,G.A)(this,"source",void 0),(0,G.A)(this,"parserOptions",void 0),"undefined"!==typeof t&&(this.source=t.source,this.parserOptions=t.parserOptions)}};const ut=class{constructor(){(0,G.A)(this,"adapters",[])}async detectAdapterCandidates(e){const t=[];for(const s of this.adapters)(0,it.A)(s.detect)&&await s.detect(e)&&t.push(s);return t}async findAdapter(e,t){if((0,H.A)(t))return this.adapters.find((e=>!!(0,rt.A)(e.mediaTypes)&&e.mediaTypes.includes(t)));const s=await this.detectAdapterCandidates(e);return(0,nt.A)(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,R.A)(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 ht=s(98921),pt=s(74921);const dt=globalThis.fetch;(0,it.A)(dt)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===gt&&null===vt)vt=mt.init().then((()=>mt.Language.load(ft))).then((e=>{const t=new mt;return t.setLanguage(e),t})).finally((()=>{vt=null})),gt=await vt;else if(null===gt&&null!==vt)gt=await vt;else if(null===gt)throw new Z("Error while initializing web-tree-sitter and loading tree-sitter-json grammar.");return gt.parse(e)};var bt=s(27317),xt=s(53163),Et=s(56146);const wt=()=>({predicates:{...n},namespace:L}),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 n=(0,bt.A)(St,s),{toolboxCreator:i,visitorOptions:r}=n,o=i(),c=t.map((e=>e(o))),a=oe(c.map((0,xt.A)({},"visitor")),{...r});c.forEach((0,Et.A)(["pre"],[]));const l=We(e,a,r);return c.forEach((0,Et.A)(["post"],[])),l};jt[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===t.length)return e;const n=(0,bt.A)(St,s),{toolboxCreator:i,visitorOptions:r}=n,o=i(),c=t.map((e=>e(o))),a=oe[Symbol.for("nodejs.util.promisify.custom")],l=We[Symbol.for("nodejs.util.promisify.custom")],u=a(c.map((0,xt.A)({},"visitor")),{...r});await Promise.allSettled(c.map((0,Et.A)(["pre"],[])));const h=await l(e,u,r);return await Promise.allSettled(c.map((0,Et.A)(["post"],[]))),h};const At=(e,t)=>{let{Type:s,plugins:n=[]}=t;const i=new s(e);return ge(e)&&(e.meta.length>0&&(i.meta=Ie(e.meta)),e.attributes.length>0&&(i.attributes=Ie(e.attributes))),jt(i,n,{toolboxCreator:wt,visitorOptions:{nodeTypeGetter:Ve}})},Pt=e=>function(t){return At(t,{...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Type:e})};O.Sh.refract=Pt(O.Sh),O.wE.refract=Pt(O.wE),O.Om.refract=Pt(O.Om),O.bd.refract=Pt(O.bd),O.Os.refract=Pt(O.Os),O.kT.refract=Pt(O.kT),O.Ft.refract=Pt(O.Ft),O.sI.refract=Pt(O.sI),q.refract=Pt(q),T.refract=Pt(T),k.refract=Pt(k),_.refract=Pt(_);const $t=class{constructor(e){(0,G.A)(this,"type",void 0),(0,G.A)(this,"startPosition",void 0),(0,G.A)(this,"endPosition",void 0),(0,G.A)(this,"startIndex",void 0),(0,G.A)(this,"endIndex",void 0),(0,G.A)(this,"text",void 0),(0,G.A)(this,"isNamed",void 0),(0,G.A)(this,"isMissing",void 0),(0,G.A)(this,"fieldName",void 0),(0,G.A)(this,"hasError",!1),(0,G.A)(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 Ot{static toPosition(e){const t=new O.wE([e.startPosition.row,e.startPosition.column,e.startIndex]),s=new O.wE([e.endPosition.row,e.endPosition.column,e.endIndex]);return t.classes.push("position"),s.classes.push("position"),[t,s]}constructor(){(0,G.A)(this,"sourceMap",!1),(0,G.A)(this,"annotations",void 0),(0,G.A)(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 $t&&!e.isNamed&&e.isMissing){const t=e.type||e.text,s="(Missing ".concat(t,")"),n=new q(s);n.classes.push("warning"),this.maybeAddSourceMap(e,n),this.annotations.push(n)}return null}document(e){const t=new k;return t._content=e.children,this.maybeAddSourceMap(e,t),t}object(e){const t=new O.Sh;return t._content=e.children,this.maybeAddSourceMap(e,t),t}array(e){const t=new O.wE;return t._content=e.children,this.maybeAddSourceMap(e,t),t}pair(e){const t=new O.Pr;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 O.Om(JSON.parse(e.text));return this.maybeAddSourceMap(e,t),t}number(e){const t=new O.kT(Number(e.text));return this.maybeAddSourceMap(e,t),t}null(e){const t=new O.Os;return this.maybeAddSourceMap(e,t),t}true(e){const t=new O.bd(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new O.bd(!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 q(o);if(c.classes.push("error"),this.maybeAddSourceMap(e,c),0===n.length){const e=new k;return e.push(c),e}return this.annotations.push(c),null}maybeAddSourceMap(e,t){if(!this.sourceMap)return;const s=new _,n=Ot.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=Ot;class Mt{constructor(e){(0,G.A)(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)}*[Symbol.iterator](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new $t(this.cursor),this.cursor.gotoFirstChild()){const[t]=new Mt(this.cursor);for(e.pushChildren(t);this.cursor.gotoNextSibling();){const t=new Mt(this.cursor);e.pushChildren(...t)}this.cursor.gotoParent()}yield e}}const qt=Mt,Ct={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"],...Ue},Tt=e=>Oe(e)?"ParseResultElement":ge(e)?Ve(e):ne(e),Rt=e=>ge(e)||ie(e),Ft=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new Bt,n=e.walk(),i=new qt(n),[r]=Array.from(i);return ce(r,s,{keyMap:Ct,nodeTypeGetter:Tt,nodePredicate:Rt,state:{sourceMap:t}})};class kt{constructor(){let{children:e=[],position:t,isMissing:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,G.A)(this,"type","node"),(0,G.A)(this,"isMissing",void 0),(0,G.A)(this,"children",void 0),(0,G.A)(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,G.A)(kt,"type","node");const It=kt;const _t=class extends It{};class Dt extends _t{get child(){return(0,nt.A)(this.children)}}(0,G.A)(Dt,"type","document");const Nt=Dt;class Vt extends It{get rootNode(){return(0,nt.A)(this.children)}}(0,G.A)(Vt,"type","parseResult");const Lt=Vt;class Jt{constructor(e){let{row:t,column:s,char:n}=e;(0,G.A)(this,"type",Jt.type),(0,G.A)(this,"row",void 0),(0,G.A)(this,"column",void 0),(0,G.A)(this,"char",void 0),this.row=t,this.column=s,this.char=n}}(0,G.A)(Jt,"type","point");class Ut{constructor(e){let{start:t,end:s}=e;(0,G.A)(this,"type",Ut.type),(0,G.A)(this,"start",void 0),(0,G.A)(this,"end",void 0),this.start=t,this.end=s}}(0,G.A)(Ut,"type","position");const Ht=Ut;class Wt extends It{constructor(){let{value:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...t}),(0,G.A)(this,"value",void 0),this.value=e}}(0,G.A)(Wt,"type","literal");const Gt=Wt,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),Qt=e=>Kt("null",e),Zt=e=>Kt("number",e),es=e=>Kt("array",e),ts=e=>Kt("object",e),ss=e=>Kt("property",e),ns=e=>Kt("key",e);class is extends _t{get properties(){return this.children.filter(ss)}}(0,G.A)(is,"type","object");const rs=is;class os extends _t{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,G.A)(os,"type","string");const cs=os;class as extends cs{}(0,G.A)(as,"type","key");const ls=as;class us extends _t{get key(){return this.children.find(ns)}get value(){return this.children.find((e=>zt(e)||Yt(e)||Qt(e)||Zt(e)||Xt(e)||es(e)||ts(e)))}}(0,G.A)(us,"type","property");const hs=us;class ps extends _t{get items(){return this.children.filter((e=>zt(e)||Yt(e)||Qt(e)||Zt(e)||Xt(e)||es(e)||ts))}}(0,G.A)(ps,"type","array");const ds=ps;class ms extends _t{constructor(e){let{value:t,...s}=e;super({...s}),(0,G.A)(this,"value",void 0),this.value=t}}(0,G.A)(ms,"type","value");const fs=ms;class gs extends fs{}(0,G.A)(gs,"type","stringContent");const vs=gs;class ys extends fs{}(0,G.A)(ys,"type","number");const bs=ys;class xs extends fs{}(0,G.A)(xs,"type","null");const Es=xs;class ws extends fs{}(0,G.A)(ws,"type","true");const Ss=ws;class js extends fs{}(0,G.A)(js,"type","false");const As=js;class Ps extends It{constructor(){let{value:e,isUnexpected:t=!1,...s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({...s}),(0,G.A)(this,"value",void 0),(0,G.A)(this,"isUnexpected",void 0),this.value=e,this.isUnexpected=t}}(0,G.A)(Ps,"type","error");const $s=Ps,Os={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"]};class Bs{constructor(){(0,G.A)(this,"document",{enter:e=>{const t=Bs.toPosition(e);return new Nt({children:e.children,position:t,isMissing:e.isMissing})},leave:e=>new Lt({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 Ht({start:t,end:s})}enter(e){if(e instanceof $t&&!e.isNamed){const t=Bs.toPosition(e),s=e.type||e.text,{isMissing:n}=e;return new Gt({value:s,position:t,isMissing:n})}}object(e){const t=Bs.toPosition(e);return new rs({children:e.children,position:t,isMissing:e.isMissing})}pair(e){const t=Bs.toPosition(e),s=e.children.slice(1),{keyNode:n}=e,i=new ls({children:(null===n||void 0===n?void 0:n.children)||[],position:null!=n?Bs.toPosition(n):void 0,isMissing:null!=n&&n.isMissing});return new hs({children:[i,...s],position:t,isMissing:e.isMissing})}array(e){const t=Bs.toPosition(e);return new ds({children:e.children,position:t,isMissing:e.isMissing})}string(e){const t=Bs.toPosition(e),s=new vs({value:JSON.parse(e.text)});return new cs({children:[s],position:t,isMissing:e.isMissing})}number(e){const t=Bs.toPosition(e),s=e.text;return new bs({value:s,position:t,isMissing:e.isMissing})}null(e){const t=Bs.toPosition(e),s=e.text;return new Es({value:s,position:t,isMissing:e.isMissing})}true(e){const t=Bs.toPosition(e),s=e.text;return new Ss({value:s,position:t,isMissing:e.isMissing})}false(e){const t=Bs.toPosition(e),s=e.text;return new As({value:s,position:t,isMissing:e.isMissing})}ERROR(e,t,s,n){const i=Bs.toPosition(e),r=new $s({children:e.children,position:i,isUnexpected:!e.hasError,isMissing:e.isMissing,value:e.text});return 0===n.length?new Lt({children:[r]}):r}}const Ms=Bs,qs={[Lt.type]:["children"],[Nt.type]:["children"],[rs.type]:["children"],[hs.type]:["children"],[ds.type]:["children"],[$s.type]:["children"],...Ue},Cs=e=>Oe(e)?"ParseResultElement":ge(e)?Ve(e):ne(e),Ts=e=>ge(e)||ie(e);const Rs=class{constructor(){(0,G.A)(this,"sourceMap",!1),(0,G.A)(this,"annotations",void 0),(0,G.A)(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 k;return t._content=e.children,t}object(e){const t=new O.Sh;return t._content=e.children,this.maybeAddSourceMap(e,t),t}property(e){const t=new O.Pr;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 O.Om(e.value);return this.maybeAddSourceMap(e,t),t}array(e){const t=new O.wE;return t._content=e.children,this.maybeAddSourceMap(e,t),t}string(e){const t=new O.Om(e.value);return this.maybeAddSourceMap(e,t),t}number(e){const t=new O.kT(Number(e.value));return this.maybeAddSourceMap(e,t),t}null(e){const t=new O.Os;return this.maybeAddSourceMap(e,t),t}true(e){const t=new O.bd(!0);return this.maybeAddSourceMap(e,t),t}false(e){const t=new O.bd(!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,n){const i=e.isUnexpected?"(Unexpected ".concat(e.value,")"):"(Error ".concat(e.value,")"),r=new q(i);if(r.classes.push("error"),this.maybeAddSourceMap(e,r),0===n.length){const e=new k;return e.push(r),e}return this.annotations.push(r),null}maybeAddSourceMap(e,t){if(!this.sourceMap)return;const s=new _;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(),n=new qt(s),[i]=Array.from(n),r=new Ms,o=new Rs,c=ce(i,r,{keyMap:Os,state:{sourceMap:t}});return ce(c.rootNode,o,{keyMap:qs,nodeTypeGetter:Cs,nodePredicate:Ts,state:{sourceMap:t}})},ks=V(),Is=/(?^\s*true\s*$)|(?^\s*false\s*$)|(?^\s*null\s*$)|(?^\s*\d+\s*$)|(?