import{g as b}from"../index-XTT3-3H0.js";var c={},x;function g(){if(x)return c;x=1,c.stringify=function(r){var e=[];e.push({obj:r});for(var a="",n,s,u,p,l,f,i,o,h,y,d;n=e.pop();)if(s=n.obj,u=n.prefix||"",p=n.val||"",a+=u,p)a+=p;else if(typeof s!="object")a+=typeof s>"u"?null:JSON.stringify(s);else if(s===null)a+="null";else if(Array.isArray(s)){for(e.push({val:"]"}),l=s.length-1;l>=0;l--)f=l===0?"":",",e.push({obj:s[l],prefix:f});e.push({val:"["})}else{i=[];for(o in s)s.hasOwnProperty(o)&&i.push(o);for(e.push({val:"}"}),l=i.length-1;l>=0;l--)h=i[l],y=s[h],d=l>0?",":"",d+=JSON.stringify(h)+":",e.push({obj:y,prefix:d});e.push({val:"{"})}return a};function v(t,r,e){var a=e[e.length-1];t===a.element&&(e.pop(),a=e[e.length-1]);var n=a.element,s=a.index;if(Array.isArray(n))n.push(t);else if(s===r.length-2){var u=r.pop();n[u]=t}else r.push(t)}return c.parse=function(t){for(var r=[],e=[],a=0,n,s,u,p,l,f,i,o,h;;){if(n=t[a++],n==="}"||n==="]"||typeof n>"u"){if(r.length===1)return r.pop();v(r.pop(),r,e);continue}switch(n){case" ":case"	":case`
`:case":":case",":break;case"n":a+=3,v(null,r,e);break;case"t":a+=3,v(!0,r,e);break;case"f":a+=4,v(!1,r,e);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(s="",a--;;)if(u=t[a++],/[\d\.\-e\+]/.test(u))s+=u;else{a--;break}v(parseFloat(s),r,e);break;case'"':for(p="",l=void 0,f=0;i=t[a++],i!=='"'||l==="\\"&&f%2===1;)p+=i,l=i,l==="\\"?f++:f=0;v(JSON.parse('"'+p+'"'),r,e);break;case"[":o={element:[],index:r.length},r.push(o.element),e.push(o);break;case"{":h={element:{},index:r.length},r.push(h.element),e.push(h);break;default:throw new Error("unexpectedly reached end of input: "+n)}}},c}var m=g();const w=b(m);export{w as v};
