{u.push(e)})}return u}_eval(e,t,r,n,s,i){this.currSandbox&&(this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=s,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t);const o=e.includes("@path");if(o){(this.currSandbox??{})._$_path=y.toPathString(n.concat([r]))}const a=this.currEval+"Script:"+e;if(!d.has(a)){let t=e.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");o&&(t=t.replaceAll("@path","_$_path"));const r=this.currEval;if(["safe",!0,void 0].includes(r))d.set(a,new this.safeVm.Script(t));else if("native"===this.currEval)d.set(a,new this.vm.Script(t));else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const e=this.currEval;d.set(a,new e(t))}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);{const e=this.currEval;d.set(a,{runInNewContext:r=>e(t,r)})}}}try{return d.get(a).runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+t.message+": "+e,{cause:t})}}}x.prototype.safeVm={Script:class{constructor(e){this.code=e,this.ast=r(this.code)}runInNewContext(e){const t=Object.assign(Object.create(null),e);return u.evalAst(this.ast,t)}}},y.prototype=x.prototype,y.clearCache=function(){f.clear(),d.clear()},y.toPathString=function(e){const t=e,r=t.length;let n="$";for(let e=1;e {u.push(e)})}return u}_eval(e,t,r,s,n,i){this.currSandbox&&(this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=n,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t);const o=e.includes("@path");if(o){(this.currSandbox??{})._$_path=y.toPathString(s.concat([r]))}const a=this.currEval+"Script:"+e;if(!d.has(a)){let t=e.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");o&&(t=t.replaceAll("@path","_$_path"));const r=this.currEval;if(["safe",!0,void 0].includes(r))d.set(a,new this.safeVm.Script(t));else if("native"===this.currEval)d.set(a,new this.vm.Script(t));else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const e=this.currEval;d.set(a,new e(t))}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);{const e=this.currEval;d.set(a,{runInNewContext:r=>e(t,r)})}}}try{return d.get(a).runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+t.message+": "+e,{cause:t})}}}x.prototype.safeVm={Script:class{constructor(e){this.code=e,this.ast=r(this.code)}runInNewContext(e){const t=Object.assign(Object.create(null),e);return u.evalAst(this.ast,t)}}},y.prototype=x.prototype,y.clearCache=function(){f.clear(),d.clear()},y.toPathString=function(e){const t=e,r=t.length;let s="$";for(let e=1;e