!function(){"use strict";window.ReafJS=function(){this.REAF_URL="https://api.reaf.co/reafy/{decodedUrl}?key={publisherKey}",this.REAF_SHORT_URL="https://reaf.co/{id}",this.PUBLISHER_KEY="74a30301-ed82-4959-b18b-033aa9a3cc52",this.urlDecoder=new window.ReafJS.UrlDecoder},window.ReafJS.UrlDecoder=function(){this.REGEX=/(?:.*ebay.*\d{12,13})|(?:.*amazon.*[A-Z0-9]{10})|(?:.*amzn\.to.*)|(?:.*ebay\.to.*)/,this.AMAZON_ADSYSTEM=/amazon-adsystem.*(http.*amazon.*)/},window.ReafJS.UrlDecoder.prototype.transform=function(a){return decodeURIComponent(a)},window.ReafJS.UrlDecoder.prototype.decode=function(a){if(this.REGEX.test(a)){var b=this.REGEX.exec(a),c=this.transform(b[b.length-1]);if(this.AMAZON_ADSYSTEM.exec(c)){var d=this.AMAZON_ADSYSTEM.exec(c);c=d[d.length-1]}return c}return""},window.ReafJS.prototype.base64urlsafe=function(a){return a=btoa(a),a=a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},window.ReafJS.prototype.replaceLinks=function(){var a=document.querySelectorAll("a[href]:not(.original-url)");Array.prototype.forEach.call(a,function(a,b,c){var d=this.base64urlsafe(this.urlDecoder.decode(a.href));d&&(a.href=this.REAF_URL.replace("{decodedUrl}",d).replace("{publisherKey}",this.PUBLISHER_KEY))}.bind(this))},window.ReafJS.prototype.start=function(){window.reafObj.replaceLinks()},window.reafObj=new ReafJS,setTimeout(function(){window.reafObj.start()},500)}();