<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">define(['jquery'],function($){'use strict';return{options:{validLinkTimeout:10*1000,storageKey:'amsearch-product-links',productsUrlSelector:'a.amsearch-image, a.amsearch-link, a.action.view'},bindLinks:function(popupContainer){$(popupContainer).find(this.options.productsUrlSelector).each(function(index,link){$(link).on('click',this.clickEvent.bind(this));}.bind(this));},saveLinks:function(popupContainer){$(popupContainer).find(this.options.productsUrlSelector).each(function(index,link){this._saveLink(link);}.bind(this));},clickEvent:function(event){const href=$(event.delegateTarget).attr('href');if(!href){return;}
event.preventDefault();this._saveLink(href);document.location.href=href;},_saveLink:function(link){let links=this.getLinks();links.push({hash:btoa(link),timestamp:$.now()});this.setLinks(links);},hasCurrentLink:function(){this.clearOutdated();return this.getLinks().some(function(storageLink){return atob(storageLink.hash)===document.location.href;});},getLinks:function(){return JSON.parse(localStorage.getItem(this.options.storageKey))||[];},setLinks:function(links){localStorage.setItem(this.options.storageKey,JSON.stringify(links));},clearOutdated:function(){let links=this.getLinks();links=links.filter(function(link){return($.now()-link.timestamp)&lt;=this.options.validLinkTimeout;}.bind(this));this.setLinks(links);}};});</pre></body></html>