Return only a plain JavaScript function declaration named searchCatalog(items, query). No imports, wrappers, test code, markdown or commentary. Do not use any tools or read any files. Each item has a string id, a string name, and an optional array of string tags. Return a new array of matched ids in original order, without mutating either input. Split the query on whitespace and match every term as a substring in the item's name or any tag; different terms may match different fields. Ignore case and equate Russian ё and е on both sides. A blank query returns all ids. Do not search the id. Do not match a term across a field boundary. The current buggy implementation searches only case-sensitive names: function searchCatalog(items, query) { return items.filter(item => item.name.includes(query)).map(item => item.id); }
