import{L as r}from"./c6a992d55-DihBdAAD.js";import{s as O,t,L as e,a as s,i as c,c as o,f as a,b as i}from"./cbd02b8f2-IC5yW-0K.js";import"./vendor--leCAzSo.js";import"./c11959232-DxhBQkj5.js";import"./index-DZuQva-j.js";import"./c723dd3dd-58n3MxoB.js";import"./ca9c256b9-7brFE8T2.js";import"./c57c2877c-dpgWZiV5.js";import"./cb5cdda9a-CSfiLIa6.js";import"./c51e217b4-KUwQQl_W.js";import"./tree-sitter-BFuuT2ac.js";import"./c8a5da52e-rN1gAVDM.js";import"./c050edc85-eTqzVnhG.js";import"./c227fa54a-CP7K5RwZ.js";import"./c87b7760f-oG193yNp.js";import"./ca720915e-vsceAWJ7.js";import"./cb6154120-B04LnQv2.js";import"./c4bf44b41-D1wBM3qa.js";import"./c9e1458cd-Bu6uzgu0.js";import"./ca0135bc5-B0Wrvs6x.js";import"./c590fc197-BYQ2NGDX.js";import"./c470fd30f-3cGltBSV.js";import"./c9a932a07-DUAMaxlu.js";import"./cac48b28c-CK_pPTKP.js";import"./c15c77ef9-BGfvXtEA.js";import"./c2f2d399f-VjB84GAO.js";import"./c1f96d614-DCyDPEHq.js";import"./c8efe91a3-D9TMU9sP.js";import"./c2ab4f27a-_LYDe9gQ.js";import"./cac5c74b6-C0cSvAmv.js";import"./c47a58ae1-B_KmD9IH.js";import"./cd2687f9f-D4XyKC_R.js";import"./cc7a628cb-Ck0w3o1v.js";import"./c995045f8-DJNhGvB7.js";import"./c2764ca9d-BNXd70jc.js";import"./c627fcdb6-StvihmuW.js";import"./c574ff469-DVsodTWU.js";import"./c9a932b3c-eSqYhCPO.js";import"./c07cc694b--Fg6nxl7.js";import"./cadc35a07-B189lGrE.js";import"./c7fe8135c-RCCGyWUX.js";import"./cfe55e8af-BfBMNAZc.js";import"./c7ac369c8-DLWZvaQg.js";import"./c41323917-CGRXZMbV.js";const p=O({String:t.string,Number:t.number,"True False":t.bool,PropertyName:t.propertyName,Null:t.null,",":t.separator,"[ ]":t.squareBracket,"{ }":t.brace}),m=r.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[p],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),P=()=>r=>{try{JSON.parse(r.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;const t=function(r,O){let t;return(t=r.message.match(/at position (\d+)/))?Math.min(+t[1],O.length):(t=r.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+t[1]).from+ +t[2]-1,O.length):0}(O,r.state.doc);return[{from:t,message:O.message,severity:"error",to:t}]}return[]};const Q=s.define({parser:m.configure({props:[c.add({Object:o({except:/^\s*\}/}),Array:o({except:/^\s*\]/})}),a.add({"Object Array":i})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function j(){return new e(Q)}export{j as json,Q as jsonLanguage,P as jsonParseLinter};
