import{format as r}from"../../utilities/format/string.js";export class SearchError extends Error{errors;constructor(o,s,...e){super(s&&r(s,...e)||"One or more sources could not be searched."),this.name="SearchError",this.errors=new Map;for(const r of o){if("errors"in r){for(const[o,s]of r.errors)this.errors.set(o,s);continue}const[o,s]=r;if(Array.isArray(o))for(const r of o)this.errors.set(r,s);else this.errors.set(o,s)}}}