class t{constructor(){this.feeds=[],this.containsFeedItem=t=>i=>i.items.some((i=>i.id===t))}handle(t){const i=this.feeds.filter((t=>t.isConnected)).filter(this.containsFeedItem(t.itemId));if(0===i.length)throw new Error(`No feed found containing item with id: ${t.itemId}`);for(const e of i)e.highlightedItemId===t.itemId&&(e.highlightedItemId=void 0),e.highlightedItemId=t.itemId}registerFeed(t){this.feeds.includes(t)||this.feeds.push(t)}unregisterFeed(t){const i=this.feeds.indexOf(t);-1!==i&&this.feeds.splice(i,1)}}t.SERVICE_NAME="feed.highlight-item";export{t as H}